aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2004-04-23 02:16:26 +0000
committerAlan Modra <amodra@gcc.gnu.org>2004-04-23 11:46:26 +0930
commit8efcd34fa233d0ce3197e042677f1a0fb2801c35 (patch)
tree19ecdce5770c443ff6c937695a19fb3fac65ea7f /gcc
parent3092d0fc1bf706c5038eaddc3510ff84c914b8c7 (diff)
downloadgcc-8efcd34fa233d0ce3197e042677f1a0fb2801c35.zip
gcc-8efcd34fa233d0ce3197e042677f1a0fb2801c35.tar.gz
gcc-8efcd34fa233d0ce3197e042677f1a0fb2801c35.tar.bz2
gcc.c (init_gcc_specs): Test USE_LD_AS_NEEDED, not HAVE_LD_AS_NEEDED.
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/alpha/linux.h8
-rw-r--r--gcc/config/arm/linux-elf.h5
-rw-r--r--gcc/config/linux.h7
-rw-r--r--gcc/config/rs6000/linux.h5
-rw-r--r--gcc/config/rs6000/linux64.h5
-rw-r--r--gcc/config/sh/linux.h5
-rw-r--r--gcc/config/sparc/linux.h5
-rw-r--r--gcc/config/sparc/linux64.h5
-rw-r--r--gcc/gcc.c7
10 files changed, 61 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e75c903..6c3d327 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h
index a4bc3d3..e2a16df 100644
--- a/gcc/config/alpha/linux.h
+++ b/gcc/config/alpha/linux.h
@@ -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. */
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index bbfcbeb..b4b389c 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -126,3 +126,8 @@
#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
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index 0f7ba17..af7bf25 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -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
diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h
index 892785d..83aef83 100644
--- a/gcc/config/rs6000/linux.h
+++ b/gcc/config/rs6000/linux.h
@@ -66,6 +66,11 @@
#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)");
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index 4fe4199..a63cb5f 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -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. */
diff --git a/gcc/config/sh/linux.h b/gcc/config/sh/linux.h
index b2ad064..b01b52d 100644
--- a/gcc/config/sh/linux.h
+++ b/gcc/config/sh/linux.h
@@ -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
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h
index ecb4731..107880f 100644
--- a/gcc/config/sparc/linux.h
+++ b/gcc/config/sparc/linux.h
@@ -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. */
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h
index 9820156..09d14ae 100644
--- a/gcc/config/sparc/linux64.h
+++ b/gcc/config/sparc/linux64.h
@@ -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. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index f9a4e1d..4e4f93b 100644
--- 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,