* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148099
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
#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
#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}}}\
%{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:\
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:\
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, '\'')))