From: John David Anglin Date: Sat, 4 Feb 2006 00:44:53 +0000 (+0000) Subject: re PR target/25926 (A87B59A SIGABRT) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3df6582b4758a45cec6fbf55917e63030a2c598f;hp=74a88f62d13fd952202dec580cfa243b4a419798;p=gcc.git re PR target/25926 (A87B59A SIGABRT) PR target/25926 * ada/initialize.c (__gnat_initialize): Provide HP-UX 10 host and target implementation that calls __main. * pa/x-ada (X_ADA_CFLAGS): Define _X_HPUX10 on HP-UX 10. * pa/t-pa (TARGET_LIBGCC2_CFLAGS): Define _T_HPUX10 on HP-UX 10. From-SVN: r110580 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ffa7c5f7e8e..75b786bb25a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-02-03 John David Anglin + + PR target/25926 + * pa/x-ada (X_ADA_CFLAGS): Define _X_HPUX10 on HP-UX 10. + * pa/t-pa (TARGET_LIBGCC2_CFLAGS): Define _T_HPUX10 on HP-UX 10. + 2006-02-03 Jason Merrill PR c++/25979 diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index df731eb3e17..04e522d88ee 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2006-02-03 John David Anglin + + PR target/25926 + * initialize.c (__gnat_initialize): Provide HP-UX 10 host and target + implementation that calls __main. + 2006-01-25 Peter O'Gorman PR bootstrap/25859 diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index 9d00698b37f..58d8ca88af6 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -170,6 +170,20 @@ __gnat_initialize (void *eh) #endif } +#elif defined(_T_HPUX10) || (!defined(IN_RTS) && defined(_X_HPUX10)) + +/************************************************/ +/* __gnat_initialize (PA-RISC HP-UX 10 Version) */ +/************************************************/ + +extern void __main (void); + +void +__gnat_initialize (void *eh ATTRIBUTE_UNUSED) +{ + __main (); +} + #else /* For all other versions of GNAT, the initialize routine and handler diff --git a/gcc/config/pa/t-pa b/gcc/config/pa/t-pa index 87d828454d0..5b1a0f911b3 100644 --- a/gcc/config/pa/t-pa +++ b/gcc/config/pa/t-pa @@ -8,4 +8,8 @@ quadlib.c: $(srcdir)/config/pa/quadlib.c rm -f quadlib.c cp $(srcdir)/config/pa/quadlib.c . -TARGET_LIBGCC2_CFLAGS = -fPIC +ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),) + TARGET_LIBGCC2_CFLAGS = -fPIC -D_T_HPUX10 +else + TARGET_LIBGCC2_CFLAGS = -fPIC +endif diff --git a/gcc/config/pa/x-ada b/gcc/config/pa/x-ada index b60b3d7925b..1e1ba698ec0 100644 --- a/gcc/config/pa/x-ada +++ b/gcc/config/pa/x-ada @@ -1,4 +1,10 @@ # The ada virtual array implementation requires that indexing be disabled on # hosts such as hpux that use a segmented memory architecture. Both the c # and ada files need to be compiled with this option for correct operation. -X_ADA_CFLAGS=-mdisable-indexing +# On HP-UX 10 hosts, we define _X_HPUX10 to cause __main () to be called at +# startup. +ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),) + X_ADA_CFLAGS = -mdisable-indexing -D_X_HPUX10 +else + X_ADA_CFLAGS = -mdisable-indexing +endif