]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.c (init_gcc_specs): Test USE_LD_AS_NEEDED, not HAVE_LD_AS_NEEDED.
authorAlan Modra <amodra@bigpond.net.au>
Fri, 23 Apr 2004 02:16:26 +0000 (02:16 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Fri, 23 Apr 2004 02:16:26 +0000 (11:46 +0930)
* gcc.c (init_gcc_specs): Test USE_LD_AS_NEEDED, not HAVE_LD_AS_NEEDED.
* config/linux.h (USE_LD_AS_NEEDED): Define.
* gcc/config/alpha/linux.h (USE_LD_AS_NEEDED): Define.
* gcc/config/arm/linux-elf.h (USE_LD_AS_NEEDED): Define.
* gcc/config/rs6000/linux.h (USE_LD_AS_NEEDED): Define.
* gcc/config/rs6000/linux64.h (USE_LD_AS_NEEDED): Define.
* gcc/config/sh/linux.h (USE_LD_AS_NEEDED): Define.
* gcc/config/sparc/linux.h (USE_LD_AS_NEEDED): Define.
* gcc/config/sparc/linux64.h (USE_LD_AS_NEEDED): Define.

From-SVN: r81072

gcc/ChangeLog
gcc/config/alpha/linux.h
gcc/config/arm/linux-elf.h
gcc/config/linux.h
gcc/config/rs6000/linux.h
gcc/config/rs6000/linux64.h
gcc/config/sh/linux.h
gcc/config/sparc/linux.h
gcc/config/sparc/linux64.h
gcc/gcc.c

index e75c903e5df8f0d62fbb8b5405c1b25f4ba2df5e..6c3d3279111451d5b666f8b3a8056f6c47beba91 100644 (file)
@@ -1,3 +1,15 @@
+2004-04-23  Alan Modra  <amodra@bigpond.net.au>
+
+       * gcc.c (init_gcc_specs): Test USE_LD_AS_NEEDED, not HAVE_LD_AS_NEEDED.
+       * config/linux.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/alpha/linux.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/arm/linux-elf.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/rs6000/linux.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/rs6000/linux64.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/sh/linux.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/sparc/linux.h (USE_LD_AS_NEEDED): Define.
+       * gcc/config/sparc/linux64.h (USE_LD_AS_NEEDED): Define.
+
 2004-04-22  Per Bothner  <per@bothner.com>
 
        * cppinit.c (cpp_read_main_file):  Return NULL rather than false.
index a4bc3d3e4a4bcf12e1308addc4aee3d63dfb2fd9..e2a16dff3dba064626467c74fc87a8f79bb8da8b 100644 (file)
@@ -1,6 +1,7 @@
 /* Definitions of target machine for GNU compiler,
    for Alpha Linux-based GNU systems.
-   Copyright (C) 1996, 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2002, 2003, 2004
+   Free Software Foundation, Inc.
    Contributed by Richard Henderson.
 
 This file is part of GCC.
@@ -70,6 +71,11 @@ Boston, MA 02111-1307, USA.  */
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
index bbfcbeb336089817a088264b05a3fb3eaeb42a5d..b4b389c1b7cdfbd0679ddb7d05d8e01bb89212e1 100644 (file)
 
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
+
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
index 0f7ba1777e8b865e78eae17a5af3b0a8e0ceb890..af7bf257ec4d29f4489ac4c215bcd097876c272d 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for Linux-based GNU systems with ELF format
-   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003
+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004
    Free Software Foundation, Inc.
    Contributed by Eric Youngdale.
    Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org).
@@ -117,6 +117,11 @@ Boston, MA 02111-1307, USA.  */
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Determine whether the the entire c99 runtime
    is present in the runtime library.  */
 #ifndef USE_GNULIBC_1
index 892785d666dcbd0cb4ac978947f0ac18f4f83527..83aef83a387b1174948801033b244ba1829f2557 100644 (file)
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 #undef  TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (PowerPC GNU/Linux)");
 
index 4fe419911c8c8fffad3b3a83651dd3d32c84a668..a63cb5fcff17a0fcdf7b6e0734693a7316484370 100644 (file)
@@ -548,6 +548,11 @@ while (0)
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
index b2ad064f8b4bd604ad7cf9427bc5a3d0e683b8d2..b01b52d28db9b7b96a90603f265521cbd849482d 100644 (file)
@@ -112,6 +112,11 @@ do { \
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Output assembler code to STREAM to call the profiler.  */
 
 #undef FUNCTION_PROFILER
index ecb473152ae7f4553fc41abfa59a8f4679d1d285..107880f401d0e6ecdcdddec3e88b16c153571ee7 100644 (file)
@@ -256,6 +256,11 @@ do {                                                                       \
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
index 9820156fd07de64ea62806ec605bd2e346bce932..09d14ae537a5a08a955b92a34fb5eba5911cab4e 100644 (file)
@@ -334,6 +334,11 @@ do {                                                                       \
 #define LINK_GCC_C_SEQUENCE_SPEC \
   "%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}"
 
+/* Use --as-needed -lgcc_s for eh support.  */
+#ifdef HAVE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 1
+#endif
+
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */
 
index f9a4e1db3cd6e9c179e05717be0267c0c073966b..4e4f93b9ccd7b85bdae930ca6da0bfcb45ad550c 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -1543,6 +1543,11 @@ static int processing_spec_function;
    various permutations of -shared-libgcc, -shared, and such.  */
 
 #if defined(ENABLE_SHARED_LIBGCC) && !defined(REAL_LIBGCC_SPEC)
+
+#ifndef USE_LD_AS_NEEDED
+#define USE_LD_AS_NEEDED 0
+#endif
+
 static void
 init_gcc_specs (struct obstack *obstack, const char *shared_name,
                const char *static_name, const char *eh_name)
@@ -1551,7 +1556,7 @@ init_gcc_specs (struct obstack *obstack, const char *shared_name,
 
   buf = concat ("%{static|static-libgcc:", static_name, " ", eh_name,
                "}%{!static:%{!static-libgcc:",
-#ifdef HAVE_LD_AS_NEEDED
+#if USE_LD_AS_NEEDED
                "%{!shared-libgcc:", static_name,
                " --as-needed ", shared_name, " --no-as-needed}"
                "%{shared-libgcc:", shared_name, "%{!shared: ", static_name,