Bug#681998: gnat-4.6: Use GCC stack frame unwinder for GNU/Hurd in tracebak.c
Trying to find the problems with gprbuild, see bug #673015, the
traceback function used for GNU/Hurd caused a segfault for gprconfig.
Digging further revealed that the GNU/Hurd stack frame does not seem to
be static enough to define USE_GENERIC_UNWINDER in gcc/ada/tracebak.c.
However, USE_GCC_UNWINDER works (and the dummy version of course)! The
patch is inlined below.
--- a/src/gcc/ada/tracebak.c 2011-09-19 11:10:42.000000000 +0200
+++ b/src/gcc/ada/tracebak.c 2012-07-17 08:46:29.000000000 +0200
@@ -320,7 +320,7 @@
/* Starting with GCC 4.6, -fomit-frame-pointer is turned on by default
32-bit x86/Linux as well and DWARF 2 unwind tables are emitted
See the x86-64 case below for the drawbacks with this approach. */
-#if defined (linux) && (__GNUC__ * 10 + __GNUC_MINOR__ > 45)
+#if (defined (linux) || defined(__GNU__)) && (__GNUC__ * 10 +
__GNUC_MINOR__ > 45)