diff options
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/pa/pa-hpux.h | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa-hpux10.h | 6 | ||||
-rw-r--r-- | gcc/config/pa/pa-hpux11.h | 3 | ||||
-rw-r--r-- | gcc/gcc.c | 5 |
5 files changed, 18 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9c05763..825c7b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com> + * config/pa/pa-hpux.h (LINK_SPEC): Remove "%<fwhole-program". + * config/pa/pa-hpux10.h (LINK_SPEC): Likewise. + * config/pa/pa-hpux11.h (LINK_SPEC): Likewise. + * gcc.c (set_collect_gcc_options): Don't add -fwhole-program + to COLLECT_GCC_OPTIONS. + +2009-06-02 Richard Sandiford <r.sandiford@uk.ibm.com> + * collect2.c (target_system_root): New variable. (main): Handle --sysroot=. (ignore_library): Strip the sysroot from the library path. diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index bd12d4f..b600b0e 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -95,12 +95,10 @@ 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 \ - "%<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}" + "%{!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 \ - "%<fwhole-program\ - %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" + "%{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 diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h index c1294df..df36ea2 100644 --- a/gcc/config/pa/pa-hpux10.h +++ b/gcc/config/pa/pa-hpux10.h @@ -82,8 +82,7 @@ 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 \ - "%<fwhole-program\ - %{!mpa-risc-1-0:%{!march=1.0:%{static:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}}\ + "%{!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}}}\ @@ -94,8 +93,7 @@ along with GCC; see the file COPYING3. If not see %{static:-a archive} %{shared:-b}" #else #define LINK_SPEC \ - "%<fwhole-program\ - %{!shared:%{p:-L/lib/libp %{!static:\ + "%{!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:\ diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h index 06b709c..09b414c 100644 --- a/gcc/config/pa/pa-hpux11.h +++ b/gcc/config/pa/pa-hpux11.h @@ -104,8 +104,7 @@ 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 \ - "%<fwhole-program\ - %{!shared:%{p:-L/lib/libp -L/usr/lib/libp %{!static:\ + "%{!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:\ @@ -4434,6 +4434,11 @@ set_collect_gcc_options (void) if ((switches[i].live_cond & SWITCH_IGNORE) != 0) continue; + /* Don't use -fwhole-program when compiling the init and fini routines, + since we'd wrongly assume that the routines aren't needed. */ + if (strcmp (switches[i].part1, "fwhole-program") == 0) + continue; + obstack_grow (&collect_obstack, "'-", 2); q = switches[i].part1; while ((p = strchr (q, '\''))) |