re PR driver/37409 (-fwhole-program option breaks collect2-generated global constructors)
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Mon, 8 Sep 2008 04:26:15 +0000 (04:26 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 8 Sep 2008 04:26:15 +0000 (04:26 +0000)
PR driver/37409
* pa-hpux.h (LINK_SPEC): Strip -fwhole-program.
* pa-hpux10.h (LINK_SPEC): Likewise.
* pa-hpux11.h (LINK_SPEC): Likewise.
`

From-SVN: r140099

gcc/ChangeLog
gcc/config/pa/pa-hpux.h
gcc/config/pa/pa-hpux10.h
gcc/config/pa/pa-hpux11.h

index a0f9fad..67faf00 100644 (file)
@@ -1,3 +1,10 @@
+2008-09-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR driver/37409
+       * pa-hpux.h (LINK_SPEC): Strip -fwhole-program.
+       * pa-hpux10.h (LINK_SPEC): Likewise.
+       * pa-hpux11.h (LINK_SPEC): Likewise.
+`
 2008-09-07  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa32-regs.h (IRA_COVER_CLASSES): Define.
index cd85cdc..7dc7f40 100644 (file)
@@ -97,10 +97,12 @@ along with GCC; see the file COPYING3.  If not see
 #undef LINK_SPEC
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
 #define LINK_SPEC \
-  "%{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
+  "%<fwhole-program\
+   %{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
 #else
 #define LINK_SPEC \
-  "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
+  "%<fwhole-program\
+   %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}"
 #endif
 
 /* hpux8 and later have C++ compatible include files, so do not
index a05a5f1..13143aa 100644 (file)
@@ -84,7 +84,8 @@ along with GCC; see the file COPYING3.  If not see
 #undef LINK_SPEC
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & MASK_PA_11)
 #define LINK_SPEC \
-  "%{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
+  "%<fwhole-program\
+   %{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\
    %{!shared:%{p:-L/lib/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
@@ -95,7 +96,8 @@ along with GCC; see the file COPYING3.  If not see
    %{static:-a archive} %{shared:-b}"
 #else
 #define LINK_SPEC \
-  "%{!shared:%{p:-L/lib/libp %{!static:\
+  "%<fwhole-program\
+   %{!shared:%{p:-L/lib/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
    %{!shared:%{pg:-L/lib/libp %{!static:\
index 8d4a807..b45109d 100644 (file)
@@ -106,7 +106,8 @@ along with GCC; see the file COPYING3.  If not see
    want dereferencing of a NULL pointer to cause a SEGV.  */
 #undef LINK_SPEC
 #define LINK_SPEC \
-  "%{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
+  "%<fwhole-program\
+   %{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\
      %nWarning: consider linking with `-static' as system libraries with\n\
      %n  profiling support are only provided in archive format}}}\
    %{!shared:%{pg:-L/lib/libp -L/usr/lib/libp %{!static:\