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
This commit is contained in:
Alan Modra 2004-04-23 02:16:26 +00:00 committed by Alan Modra
parent 3092d0fc1b
commit 8efcd34fa2
10 changed files with 61 additions and 3 deletions

View 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.

View 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. */

View File

@ -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

View 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

View File

@ -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)");

View 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. */

View 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

View 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. */

View 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. */

View File

@ -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,