re PR target/25926 (A87B59A SIGABRT)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Sat, 4 Feb 2006 00:44:53 +0000 (00:44 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 4 Feb 2006 00:44:53 +0000 (00:44 +0000)
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

gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/initialize.c
gcc/config/pa/t-pa
gcc/config/pa/x-ada

index ffa7c5f7e8e4c1f5344b497fdc17c6f15bd6aa66..75b786bb25ac3562d214502a3677b194474a9075 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       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  <jason@redhat.com>
 
        PR c++/25979
index df731eb3e172b9b75bcc7f5e0ac7c99a85ed9420..04e522d88eecda69bb5e487f7193db19017085e8 100644 (file)
@@ -1,3 +1,9 @@
+2006-02-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR target/25926
+       * initialize.c (__gnat_initialize): Provide HP-UX 10 host and target
+       implementation that calls __main.
+
 2006-01-25  Peter O'Gorman  <peter@pogma.com>
 
        PR bootstrap/25859
index 9d00698b37fdefce5e1fc78938507c1120988a27..58d8ca88af6bb0ac493b2236057efc7999acfe6e 100644 (file)
@@ -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
index 87d828454d0a9b527eaa0009950ea274934d48a5..5b1a0f911b31912c4b596443a3af4a4dd9459dbd 100644 (file)
@@ -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
index b60b3d7925bfb6337e9b8d3867ead1bccf585741..1e1ba698ec0e67f214ac272777de2c17481f472a 100644 (file)
@@ -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