[PATCH] Fix PR33608, bootstrap failure with ia64 and ada
Paolo Bonzini
bonzini@gnu.org
Mon Oct 22 17:39:00 GMT 2007
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);
>
More information about the Gcc-patches
mailing list