This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR33608, bootstrap failure with ia64 and ada


Richard Guenther wrote:
On Mon, 22 Oct 2007, Eric Botcazou wrote:

The following fixes PR33608 where we end up installing an unwind.h header
that contains a call to abort () which we re-define inside gcc.  It
happens that ada somewhere includes this re-define without linking to
an object that provides fancy_abort, so we'll fail bootstrap with

gcc -static-libgcc  -o gnatbind ... ../libcpp/libcpp.a
../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
-lmpfr -lgmp
ada/tracebak.o: In function `_Unwind_GetTextRelBase':
/usr/lib/gcc/ia64-suse-linux/4.3.0/include/unwind.h:229: undefined
reference to
`fancy_abort'
collect2: ld returned 1 exit status
make[3]: *** [gnatbind] Error 1

fixed by avoiding macro-expansion in unwind-generic.h.
Thanks for investigating this. I think that we can get away on the Ada side by using the same kludge in tb-gcc.c as in raise-gcc.c:

/* We don't want fancy_abort here.  */
#undef abort


If that works for you, please install it.

As tb-gcc.c is only included from tracebak.c a better place to #undef abort is probably there.

Like the following. Ok if this passes?

Thanks,
Richard.

Index: tracebak.c
===================================================================
--- tracebak.c (revision 129547)
+++ tracebak.c (working copy)
@@ -57,6 +57,8 @@
#else
#include "config.h"
#include "system.h"
+/* We don't want fancy_abort here. */
+#undef abort
#endif
extern int __gnat_backtrace (void **, int, void *, void *, int);




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]