Commit 7bd85ce0 by Joseph Myers Committed by Joseph Myers

re PR target/24837 (move dynamic linker names out of LINK_SPEC and into new DYNAMIC_LINKER)

	PR target/24837
	* config.gcc: Define UCLIBC_DEFAULT to 0 or 1.
	* opth-gen.awk: Handle Var and InverseMask together.
	* config/linux.opt (muclibc, mglibc): Use Var(linux_uclibc).
	* config/linux.h: Use #if not #ifdef for testing UCLIBC_DEFAULT.
	(TARGET_C99_FUNCTIONS): Test OPTION_GLIBC not TARGET_GLIBC.
	(CHOOSE_DYNAMIC_LINKER): Give an error for -mglibc and -muclibc
	used together.
	(UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	* config/alpha/linux-elf.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(ELF_DYNAMIC_LINKER): Define to LINUX_DYNAMIC_LINKER.
	* config/alpha/linux.h (TARGET_C99_FUNCTIONS): Define to
	TARGET_GLIBC.
	* config/cris/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(CRIS_LINK_SUBTARGET_SPEC): Pass a -dynamic-linker option.
	* config/frv/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	(TARGET_C99_FUNCTIONS): Don't define.
	* config/i386/linux.h (DYNAMIC_LINKER): Rename to
	GLIBC_DYNAMIC_LINKER.
	(SUBTARGET_EXTRA_SPECS): Use LINUX_DYNAMIC_LINKER.
	* config/i386/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
	LINUX_DYNAMIC_LINKER64.
	* config/ia64/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/m32r/linux.h (GLIBC_DYNAMIC_LINKE): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/m68k/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/mips/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64, GLIBC_DYNAMIC_LINKERN32,
	UCLIBC_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKERN32): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKER64
	and LINUX_DYNAMIC_LINKER32.
	* config/mn10300/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/pa/pa-linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/rs6000/linux.h (TARGET_C99_FUNCTIONS): Define to
	TARGET_GLIBC.
	* config/rs6000/linux64.h (TARGET_C99_FUNCTIONS): Likewise.
	(GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64,
	UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
	CHOOSE_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	(LINK_OS_LINUX_SPEC32): Use LINUX_DYNAMIC_LINKER32.
	(LINK_OS_LINUX_SPEC64): Use LINUX_DYNAMIC_LINKER64.
	* config/rs6000/sysv4.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(LINK_OS_LINUX_SPEC): Use LINUX_DYNAMIC_LINKE.
	* config/s390/linux.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
	LINUX_DYNAMIC_LINKER64.
	* config/sh/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(SUBTARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* config/sparc/linux.h (GLIBC_DYNAMIC_LINKER,
	UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
	* config/sparc/linux64.h (GLIBC_DYNAMIC_LINKER32,
	GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER32,
	UCLIBC_DYNAMIC_LINKER64, CHOOSE_DYNAMIC_LINKER,
	LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
	(LINK_ARCH32_SPEC): Use LINUX_DYNAMIC_LINKER32.
	(LINK_ARCH64_SPEC, LINK_SPEC): Use LINUX_DYNAMIC_LINKER64.
	(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
	* config/xtensa/linux.h (GLIBC_DYNAMIC_LINKER): Define.
	(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
	* doc/invoke.texi (-muclibc): Remove caveat about supported
	targets.

testsuite:
	* gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: New tests.

From-SVN: r111235
parent be8ac3e2
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
PR target/24837
* config.gcc: Define UCLIBC_DEFAULT to 0 or 1.
* opth-gen.awk: Handle Var and InverseMask together.
* config/linux.opt (muclibc, mglibc): Use Var(linux_uclibc).
* config/linux.h: Use #if not #ifdef for testing UCLIBC_DEFAULT.
(TARGET_C99_FUNCTIONS): Test OPTION_GLIBC not TARGET_GLIBC.
(CHOOSE_DYNAMIC_LINKER): Give an error for -mglibc and -muclibc
used together.
(UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
* config/alpha/linux-elf.h (GLIBC_DYNAMIC_LINKER,
UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER): Define.
(ELF_DYNAMIC_LINKER): Define to LINUX_DYNAMIC_LINKER.
* config/alpha/linux.h (TARGET_C99_FUNCTIONS): Define to
TARGET_GLIBC.
* config/cris/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(CRIS_LINK_SUBTARGET_SPEC): Pass a -dynamic-linker option.
* config/frv/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
(TARGET_C99_FUNCTIONS): Don't define.
* config/i386/linux.h (DYNAMIC_LINKER): Rename to
GLIBC_DYNAMIC_LINKER.
(SUBTARGET_EXTRA_SPECS): Use LINUX_DYNAMIC_LINKER.
* config/i386/linux64.h (GLIBC_DYNAMIC_LINKER32,
GLIBC_DYNAMIC_LINKER64): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
LINUX_DYNAMIC_LINKER64.
* config/ia64/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/m32r/linux.h (GLIBC_DYNAMIC_LINKE): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/m68k/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/mips/linux64.h (GLIBC_DYNAMIC_LINKER32,
GLIBC_DYNAMIC_LINKER64, GLIBC_DYNAMIC_LINKERN32,
UCLIBC_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKERN32): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKERN32, LINUX_DYNAMIC_LINKER64
and LINUX_DYNAMIC_LINKER32.
* config/mn10300/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/pa/pa-linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/rs6000/linux.h (TARGET_C99_FUNCTIONS): Define to
TARGET_GLIBC.
* config/rs6000/linux64.h (TARGET_C99_FUNCTIONS): Likewise.
(GLIBC_DYNAMIC_LINKER32, GLIBC_DYNAMIC_LINKER64,
UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
CHOOSE_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
(LINK_OS_LINUX_SPEC32): Use LINUX_DYNAMIC_LINKER32.
(LINK_OS_LINUX_SPEC64): Use LINUX_DYNAMIC_LINKER64.
* config/rs6000/sysv4.h (GLIBC_DYNAMIC_LINKER,
UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER): Define.
(LINK_OS_LINUX_SPEC): Use LINUX_DYNAMIC_LINKE.
* config/s390/linux.h (GLIBC_DYNAMIC_LINKER32,
GLIBC_DYNAMIC_LINKER64): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER32 and
LINUX_DYNAMIC_LINKER64.
* config/sh/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(SUBTARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* config/sparc/linux.h (GLIBC_DYNAMIC_LINKER,
UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
* config/sparc/linux64.h (GLIBC_DYNAMIC_LINKER32,
GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER32,
UCLIBC_DYNAMIC_LINKER64, CHOOSE_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64): Define.
(LINK_ARCH32_SPEC): Use LINUX_DYNAMIC_LINKER32.
(LINK_ARCH64_SPEC, LINK_SPEC): Use LINUX_DYNAMIC_LINKER64.
(TARGET_C99_FUNCTIONS): Define to TARGET_GLIBC.
* config/xtensa/linux.h (GLIBC_DYNAMIC_LINKER): Define.
(LINK_SPEC): Use LINUX_DYNAMIC_LINKER.
* doc/invoke.texi (-muclibc): Remove caveat about supported
targets.
2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
* doc/cpp.texi (__TIMESTAMP__): Document. * doc/cpp.texi (__TIMESTAMP__): Document.
......
...@@ -455,7 +455,10 @@ case ${target} in ...@@ -455,7 +455,10 @@ case ${target} in
tmake_file="t-slibgcc-elf-ver t-linux" tmake_file="t-slibgcc-elf-ver t-linux"
case ${target} in case ${target} in
*-*-*uclibc*) *-*-*uclibc*)
tm_defines="${tm_defines} UCLIBC_DEFAULT" tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
;;
*)
tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
;; ;;
esac esac
;; ;;
......
/* Definitions of target machine for GNU compiler /* Definitions of target machine for GNU compiler
for Alpha Linux-based GNU systems using ELF. for Alpha Linux-based GNU systems using ELF.
Copyright (C) 1996, 1997 Free Software Foundation, Inc. Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2006
Free Software Foundation, Inc.
Contributed by Richard Henderson. Contributed by Richard Henderson.
This file is part of GCC. This file is part of GCC.
...@@ -27,7 +28,17 @@ Boston, MA 02110-1301, USA. */ ...@@ -27,7 +28,17 @@ Boston, MA 02110-1301, USA. */
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
{ "elf_dynamic_linker", ELF_DYNAMIC_LINKER }, { "elf_dynamic_linker", ELF_DYNAMIC_LINKER },
#define ELF_DYNAMIC_LINKER "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
#define ELF_DYNAMIC_LINKER LINUX_DYNAMIC_LINKER
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \ #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
%{O*:-O3} %{!O*:-O1} \ %{O*:-O3} %{!O*:-O1} \
......
/* Definitions of target machine for GNU compiler, /* Definitions of target machine for GNU compiler,
for Alpha Linux-based GNU systems. for Alpha Linux-based GNU systems.
Copyright (C) 1996, 1997, 1998, 2002, 2003, 2004, 2005 Copyright (C) 1996, 1997, 1998, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Richard Henderson. Contributed by Richard Henderson.
...@@ -64,7 +64,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -64,7 +64,7 @@ Boston, MA 02110-1301, USA. */
/* Determine whether the entire c99 runtime is present in the /* Determine whether the entire c99 runtime is present in the
runtime library. */ runtime library. */
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#define TARGET_POSIX_IO #define TARGET_POSIX_IO
......
/* Definitions for GCC. Part of the machine description for CRIS. /* Definitions for GCC. Part of the machine description for CRIS.
Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
Contributed by Axis Communications. Written by Hans-Peter Nilsson. Contributed by Axis Communications. Written by Hans-Peter Nilsson.
This file is part of GCC. This file is part of GCC.
...@@ -76,6 +76,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -76,6 +76,8 @@ Boston, MA 02110-1301, USA. */
#undef CRIS_SUBTARGET_VERSION #undef CRIS_SUBTARGET_VERSION
#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu" #define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
/* We need an -rpath-link to ld.so.1, and presumably to each directory /* We need an -rpath-link to ld.so.1, and presumably to each directory
specified with -B. */ specified with -B. */
#undef CRIS_LINK_SUBTARGET_SPEC #undef CRIS_LINK_SUBTARGET_SPEC
...@@ -84,7 +86,9 @@ Boston, MA 02110-1301, USA. */ ...@@ -84,7 +86,9 @@ Boston, MA 02110-1301, USA. */
-rpath-link include/asm/../..%s\ -rpath-link include/asm/../..%s\
%{shared} %{static}\ %{shared} %{static}\
%{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\ %{symbolic:-Bdynamic} %{shlib:-Bdynamic} %{static:-Bstatic}\
%{!shared:%{!static:%{rdynamic:-export-dynamic}}}\ %{!shared:%{!static:\
%{rdynamic:-export-dynamic}\
%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}\
%{!r:%{O2|O3: --gc-sections}}" %{!r:%{O2|O3: --gc-sections}}"
......
/* Target macros for the FRV Linux port of GCC. /* Target macros for the FRV Linux port of GCC.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Red Hat Inc. Contributed by Red Hat Inc.
...@@ -36,12 +36,14 @@ ...@@ -36,12 +36,14 @@
#define ENDFILE_SPEC \ #define ENDFILE_SPEC \
"%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "\ #define LINK_SPEC "\
%{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \ %{mfdpic: -m elf32frvfd -z text} %{shared} %{pie} \
%{!shared: %{!static: \ %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static}}" %{static}}"
/* Support for compile-time default CPU. */ /* Support for compile-time default CPU. */
...@@ -71,19 +73,4 @@ asm (TEXT_SECTION_ASM_OP); ...@@ -71,19 +73,4 @@ asm (TEXT_SECTION_ASM_OP);
#undef Twrite #undef Twrite
#define Twrite __write #define Twrite __write
/* uClibc doesn't support many of the C90-reserved C99-defined math
functions. Make sure we don't implicitly generate them unless C99
support is explicitly requested. This will affect both frv-linux
and frv-uclinux. Even though the glibc, the primary library for
frv-linux, would enable better code to be generated with
TARGET_C99_FUNCTIONS defined to 1, uClinux can be used as the
library for frv-linux as well, and we'd better have that work
correctly. Maybe we move this to a uclibc.h header in the future,
and use that for frv-uclinux and frv-linux-uclibc? Define it here
for now, such that we can still get exactly the same code out of
both frv-linux-gcc and frv-uclinux-gcc, when feeding them the same
preprocessed sources. */
#undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 0
#endif /* __FRV_LINUX_H__ */ #endif /* __FRV_LINUX_H__ */
/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. /* Definitions for Intel 386 running Linux-based GNU systems with ELF format.
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2002, 2004, 2005,
Free Software Foundation, Inc. 2006 Free Software Foundation, Inc.
Contributed by Eric Youngdale. Contributed by Eric Youngdale.
Modified for stabs-in-ELF by H.J. Lu. Modified for stabs-in-ELF by H.J. Lu.
...@@ -100,12 +100,12 @@ Boston, MA 02110-1301, USA. */ ...@@ -100,12 +100,12 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define LINK_EMULATION "elf_i386" #define LINK_EMULATION "elf_i386"
#define DYNAMIC_LINKER "/lib/ld-linux.so.2" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#undef SUBTARGET_EXTRA_SPECS #undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \ #define SUBTARGET_EXTRA_SPECS \
{ "link_emulation", LINK_EMULATION },\ { "link_emulation", LINK_EMULATION },\
{ "dynamic_linker", DYNAMIC_LINKER } { "dynamic_linker", LINUX_DYNAMIC_LINKER }
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \ #define LINK_SPEC "-m %(link_emulation) %{shared:-shared} \
......
/* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format. /* Definitions for AMD x86-64 running Linux-based GNU systems with ELF format.
Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
Contributed by Jan Hubicka <jh@suse.cz>, based on linux.h. Contributed by Jan Hubicka <jh@suse.cz>, based on linux.h.
This file is part of GCC. This file is part of GCC.
...@@ -49,14 +49,17 @@ Boston, MA 02110-1301, USA. */ ...@@ -49,14 +49,17 @@ Boston, MA 02110-1301, USA. */
When the -shared link option is used a final link is not being When the -shared link option is used a final link is not being
done. */ done. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \ #define LINK_SPEC "%{!m32:-m elf_x86_64} %{m32:-m elf_i386} \
%{shared:-shared} \ %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{m32:%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{m32:%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
%{!m32:%{!dynamic-linker:-dynamic-linker /lib64/ld-linux-x86-64.so.2}}} \ %{!m32:%{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}} \
%{static:-static}}" %{static:-static}}"
/* Similar to standard Linux, but adding -ffast-math support. */ /* Similar to standard Linux, but adding -ffast-math support. */
......
...@@ -37,13 +37,15 @@ do { \ ...@@ -37,13 +37,15 @@ do { \
/* Define this for shared library support because it isn't in the main /* Define this for shared library support because it isn't in the main
linux.h file. */ linux.h file. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-ia64.so.2"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "\ #define LINK_SPEC "\
%{shared:-shared} \ %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux-ia64.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}" %{static:-static}}"
......
...@@ -102,21 +102,28 @@ Boston, MA 02110-1301, USA. */ ...@@ -102,21 +102,28 @@ Boston, MA 02110-1301, USA. */
/* Determine which dynamic linker to use depending on whether GLIBC or /* Determine which dynamic linker to use depending on whether GLIBC or
uClibc is the default C library and whether -muclibc or -mglibc has uClibc is the default C library and whether -muclibc or -mglibc has
been passed to change the default. */ been passed to change the default. */
#ifdef UCLIBC_DEFAULT #if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else #else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif #endif
/* For most targets with a single dynamic linker the following /* For most targets the following definitions suffice;
definitions suffice; GLIBC_DYNAMIC_LINKER must be defined for each GLIBC_DYNAMIC_LINKER must be defined for each target using them, or
target using them. */ GLIBC_DYNAMIC_LINKER32 and GLIBC_DYNAMIC_LINKER64 for targets
supporting both 32-bit and 64-bit compilation. */
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#define LINUX_DYNAMIC_LINKER \ #define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
#define LINUX_DYNAMIC_LINKER32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
#define LINUX_DYNAMIC_LINKER64 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
/* Determine whether the entire c99 runtime /* Determine whether the entire c99 runtime
is present in the runtime library. */ is present in the runtime library. */
#define TARGET_C99_FUNCTIONS (TARGET_GLIBC) #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#define TARGET_POSIX_IO #define TARGET_POSIX_IO
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
; 02110-1301, USA. ; 02110-1301, USA.
muclibc muclibc
Target RejectNegative Report Mask(UCLIBC) Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0)
Use uClibc instead of GNU libc Use uClibc instead of GNU libc
mglibc mglibc
Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) VarExists
Use GNU libc instead of uClibc Use GNU libc instead of uClibc
/* Definitions for Renesas M32R running Linux-based GNU systems using ELF. /* Definitions for Renesas M32R running Linux-based GNU systems using ELF.
Copyright (C) 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -59,6 +59,8 @@ ...@@ -59,6 +59,8 @@
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#undef LINK_SPEC #undef LINK_SPEC
#if TARGET_LITTLE_ENDIAN #if TARGET_LITTLE_ENDIAN
#define LINK_SPEC "%(link_cpu) -m m32rlelf_linux %{shared:-shared} \ #define LINK_SPEC "%(link_cpu) -m m32rlelf_linux %{shared:-shared} \
...@@ -66,7 +68,7 @@ ...@@ -66,7 +68,7 @@
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}}" %{static:-static}}}"
#else #else
#define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \ #define LINK_SPEC "%(link_cpu) -m m32relf_linux %{shared:-shared} \
...@@ -74,7 +76,7 @@ ...@@ -74,7 +76,7 @@
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}}" %{static:-static}}}"
#endif #endif
......
...@@ -123,12 +123,14 @@ Boston, MA 02110-1301, USA. */ ...@@ -123,12 +123,14 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "-m m68kelf %{shared} \ #define LINK_SPEC "-m m68kelf %{shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker*:-dynamic-linker /lib/ld.so.1}} \ %{!dynamic-linker*:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static}}" %{static}}"
/* For compatibility with linux/a.out */ /* For compatibility with linux/a.out */
......
/* Definitions for MIPS running Linux-based GNU systems with ELF format /* Definitions for MIPS running Linux-based GNU systems with ELF format
using n32/64 abi. using n32/64 abi.
Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc. Copyright 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -36,6 +36,13 @@ Boston, MA 02110-1301, USA. */ ...@@ -36,6 +36,13 @@ Boston, MA 02110-1301, USA. */
%{!shared: %{pthread:-lpthread} \ %{!shared: %{pthread:-lpthread} \
%{profile:-lc_p} %{!profile: -lc}}" %{profile:-lc_p} %{!profile: -lc}}"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld.so.1"
#define GLIBC_DYNAMIC_LINKERN32 "/lib32/ld.so.1"
#define UCLIBC_DYNAMIC_LINKERN32 "/lib32/ld-uClibc.so.0"
#define LINUX_DYNAMIC_LINKERN32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32)
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "\ #define LINK_SPEC "\
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \ %{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} \
...@@ -47,9 +54,9 @@ Boston, MA 02110-1301, USA. */ ...@@ -47,9 +54,9 @@ Boston, MA 02110-1301, USA. */
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker: \ %{!dynamic-linker: \
%{mabi=n32: -dynamic-linker /lib32/ld.so.1} \ %{mabi=n32: -dynamic-linker " LINUX_DYNAMIC_LINKERN32 "} \
%{mabi=64: -dynamic-linker /lib64/ld.so.1} \ %{mabi=64: -dynamic-linker " LINUX_DYNAMIC_LINKER64 "} \
%{mabi=32: -dynamic-linker /lib/ld.so.1}}} \ %{mabi=32: -dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}} \
%{static:-static}}} \ %{static:-static}}} \
%{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \ %{mabi=n32:-melf32%{EB:b}%{EL:l}tsmipn32} \
%{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \ %{mabi=64:-melf64%{EB:b}%{EL:l}tsmip} \
......
/* Definitions of taret machine for GNU compiler. /* Definitions of taret machine for GNU compiler.
Matsushita AM33/2.0 Matsushita AM33/2.0
Copyright 2001, 2002, 2005 Free Software Foundation, Inc. Copyright 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
Contributed by Alexandre Oliva <aoliva@redhat.com> Contributed by Alexandre Oliva <aoliva@redhat.com>
This file is part of GCC. This file is part of GCC.
...@@ -33,11 +33,13 @@ ...@@ -33,11 +33,13 @@
#undef ASM_SPEC #undef ASM_SPEC
#define ASM_SPEC "%{Wa,*:%*}" #define ASM_SPEC "%{Wa,*:%*}"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \ #define LINK_SPEC "%{mrelax:--relax} %{shared:-shared} \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}" %{static:-static}"
#undef PROCESSOR_DEFAULT #undef PROCESSOR_DEFAULT
......
/* Definitions for PA_RISC with ELF format /* Definitions for PA_RISC with ELF format
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -44,13 +45,15 @@ Boston, MA 02110-1301, USA. */ ...@@ -44,13 +45,15 @@ Boston, MA 02110-1301, USA. */
/* Define this for shared library support because it isn't in the main /* Define this for shared library support because it isn't in the main
linux.h file. */ linux.h file. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "\ #define LINK_SPEC "\
%{shared:-shared} \ %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}" %{static:-static}}"
/* glibc's profiling functions don't need gcc to allocate counters. */ /* glibc's profiling functions don't need gcc to allocate counters. */
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* glibc has float and long double forms of math functions. */ /* glibc has float and long double forms of math functions. */
#undef TARGET_C99_FUNCTIONS #undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#undef TARGET_OS_CPP_BUILTINS #undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
......
...@@ -283,7 +283,7 @@ extern int dot_symbols; ...@@ -283,7 +283,7 @@ extern int dot_symbols;
/* glibc has float and long double forms of math functions. */ /* glibc has float and long double forms of math functions. */
#undef TARGET_C99_FUNCTIONS #undef TARGET_C99_FUNCTIONS
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#undef TARGET_OS_CPP_BUILTINS #undef TARGET_OS_CPP_BUILTINS
#define TARGET_OS_CPP_BUILTINS() \ #define TARGET_OS_CPP_BUILTINS() \
...@@ -336,13 +336,28 @@ extern int dot_symbols; ...@@ -336,13 +336,28 @@ extern int dot_symbols;
#undef LINK_OS_DEFAULT_SPEC #undef LINK_OS_DEFAULT_SPEC
#define LINK_OS_DEFAULT_SPEC "%(link_os_linux)" #define LINK_OS_DEFAULT_SPEC "%(link_os_linux)"
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif
#define LINUX_DYNAMIC_LINKER32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
#define LINUX_DYNAMIC_LINKER64 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
#define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}}}"
#define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \ #define LINK_OS_LINUX_SPEC64 "-m elf64ppc %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib64/ld64.so.1}}}" %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}"
#undef TOC_SECTION_ASM_OP #undef TOC_SECTION_ASM_OP
#define TOC_SECTION_ASM_OP \ #define TOC_SECTION_ASM_OP \
......
...@@ -909,9 +909,19 @@ extern int fixuplabelno; ...@@ -909,9 +909,19 @@ extern int fixuplabelno;
#define LINK_START_LINUX_SPEC "" #define LINK_START_LINUX_SPEC ""
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
#define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}" %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}}}"
#if defined(HAVE_LD_EH_FRAME_HDR) #if defined(HAVE_LD_EH_FRAME_HDR)
# define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
......
/* Definitions for Linux for S/390. /* Definitions for Linux for S/390.
Copyright (C) 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2004, 2005, 2006
Free Software Foundation, Inc.
Contributed by Hartmut Penner (hpenner@de.ibm.com) and Contributed by Hartmut Penner (hpenner@de.ibm.com) and
Ulrich Weigand (uweigand@de.ibm.com). Ulrich Weigand (uweigand@de.ibm.com).
...@@ -72,6 +73,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -72,6 +73,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define MULTILIB_DEFAULTS { "m31" } #define MULTILIB_DEFAULTS { "m31" }
#endif #endif
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
#define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC \ #define LINK_SPEC \
"%{m31:-m elf_s390}%{m64:-m elf64_s390} \ "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
...@@ -81,8 +85,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -81,8 +85,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker: \ %{!dynamic-linker: \
%{m31:-dynamic-linker /lib/ld.so.1} \ %{m31:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "} \
%{m64:-dynamic-linker /lib/ld64.so.1}}}}" %{m64:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}}}}"
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
......
/* Definitions for SH running Linux-based GNU systems using ELF /* Definitions for SH running Linux-based GNU systems using ELF
Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Kazumoto Kojima <kkojima@rr.iij4u.or.jp> Contributed by Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
...@@ -48,6 +48,8 @@ Boston, MA 02110-1301, USA. */ ...@@ -48,6 +48,8 @@ Boston, MA 02110-1301, USA. */
#define TARGET_ASM_FILE_END file_end_indicate_exec_stack #define TARGET_ASM_FILE_END file_end_indicate_exec_stack
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#undef SUBTARGET_LINK_EMUL_SUFFIX #undef SUBTARGET_LINK_EMUL_SUFFIX
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux" #define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
#undef SUBTARGET_LINK_SPEC #undef SUBTARGET_LINK_SPEC
...@@ -55,7 +57,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -55,7 +57,7 @@ Boston, MA 02110-1301, USA. */
"%{shared:-shared} \ "%{shared:-shared} \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}" %{static:-static}"
/* Output assembler code to STREAM to call the profiler. */ /* Output assembler code to STREAM to call the profiler. */
......
/* Definitions for SPARC running Linux-based GNU systems with ELF. /* Definitions for SPARC running Linux-based GNU systems with ELF.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by Eddie C. Dost (ecd@skynet.be) Contributed by Eddie C. Dost (ecd@skynet.be)
...@@ -121,6 +121,17 @@ Boston, MA 02110-1301, USA. */ ...@@ -121,6 +121,17 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0"
#if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif
#define LINUX_DYNAMIC_LINKER \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER)
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ #define LINK_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!mno-relax:%{!r:-relax}} \ %{!mno-relax:%{!r:-relax}} \
...@@ -128,7 +139,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -128,7 +139,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}}" %{static:-static}}}"
/* The sun bundled assembler doesn't accept -Yd, (and neither does gas). /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
...@@ -202,7 +213,7 @@ do { \ ...@@ -202,7 +213,7 @@ do { \
/* Determine whether the entire c99 runtime is present in the /* Determine whether the entire c99 runtime is present in the
runtime library. */ runtime library. */
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#define TARGET_POSIX_IO #define TARGET_POSIX_IO
......
/* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF. /* Definitions for 64-bit SPARC running Linux-based GNU systems with ELF.
Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005 Copyright 1996, 1997, 1998, 2000, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
Contributed by David S. Miller (davem@caip.rutgers.edu) Contributed by David S. Miller (davem@caip.rutgers.edu)
...@@ -143,6 +143,20 @@ Boston, MA 02110-1301, USA. */ ...@@ -143,6 +143,20 @@ Boston, MA 02110-1301, USA. */
/* If ELF is the default format, we should not use /lib/elf. */ /* If ELF is the default format, we should not use /lib/elf. */
#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux.so.2"
#define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0"
#define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0"
#if UCLIBC_DEFAULT
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}"
#else
#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}"
#endif
#define LINUX_DYNAMIC_LINKER32 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
#define LINUX_DYNAMIC_LINKER64 \
CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
#ifdef SPARC_BI_ARCH #ifdef SPARC_BI_ARCH
#undef SUBTARGET_EXTRA_SPECS #undef SUBTARGET_EXTRA_SPECS
...@@ -151,13 +165,13 @@ Boston, MA 02110-1301, USA. */ ...@@ -151,13 +165,13 @@ Boston, MA 02110-1301, USA. */
{ "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch64", LINK_ARCH64_SPEC }, \
{ "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \
{ "link_arch", LINK_ARCH_SPEC }, { "link_arch", LINK_ARCH_SPEC },
#define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \
%{!shared: \ %{!shared: \
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \
%{static:-static}}} \ %{static:-static}}} \
" "
...@@ -166,7 +180,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -166,7 +180,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
%{static:-static}}} \ %{static:-static}}} \
" "
...@@ -247,7 +261,7 @@ Boston, MA 02110-1301, USA. */ ...@@ -247,7 +261,7 @@ Boston, MA 02110-1301, USA. */
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \
%{static:-static}}} \ %{static:-static}}} \
%{mlittle-endian:-EL} \ %{mlittle-endian:-EL} \
%{!mno-relax:%{!r:-relax}} \ %{!mno-relax:%{!r:-relax}} \
...@@ -330,7 +344,7 @@ do { \ ...@@ -330,7 +344,7 @@ do { \
/* Determine whether the entire c99 runtime is present in the /* Determine whether the entire c99 runtime is present in the
runtime library. */ runtime library. */
#define TARGET_C99_FUNCTIONS 1 #define TARGET_C99_FUNCTIONS (OPTION_GLIBC)
#define TARGET_POSIX_IO #define TARGET_POSIX_IO
......
/* Xtensa Linux configuration. /* Xtensa Linux configuration.
Derived from the configuration for GCC for Intel i386 running Linux. Derived from the configuration for GCC for Intel i386 running Linux.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. Copyright (C) 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -43,6 +43,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -43,6 +43,8 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
%{mlongcalls:--longcalls} \ %{mlongcalls:--longcalls} \
%{mno-longcalls:--no-longcalls}" %{mno-longcalls:--no-longcalls}"
#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
#undef LINK_SPEC #undef LINK_SPEC
#define LINK_SPEC \ #define LINK_SPEC \
"%{shared:-shared} \ "%{shared:-shared} \
...@@ -50,7 +52,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA ...@@ -50,7 +52,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
%{!ibcs: \ %{!ibcs: \
%{!static: \ %{!static: \
%{rdynamic:-export-dynamic} \ %{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /lib/ld.so.1}} \ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \
%{static:-static}}}" %{static:-static}}}"
#undef LOCAL_LABEL_PREFIX #undef LOCAL_LABEL_PREFIX
......
...@@ -8801,8 +8801,7 @@ on @samp{*-*-linux-*uclibc*} targets. ...@@ -8801,8 +8801,7 @@ on @samp{*-*-linux-*uclibc*} targets.
@item -muclibc @item -muclibc
@opindex muclibc @opindex muclibc
Use uClibc instead of the GNU C library. This is the default on Use uClibc instead of the GNU C library. This is the default on
@samp{*-*-linux-*uclibc*} targets. GCC currently only supports uClibc @samp{*-*-linux-*uclibc*} targets.
on ARM and 32-bit MIPS targets.
@end table @end table
@node H8/300 Options @node H8/300 Options
......
# Copyright (C) 2003,2004 Free Software Foundation, Inc. # Copyright (C) 2003,2004,2005,2006 Free Software Foundation, Inc.
# Contributed by Kelley Cook, June 2004. # Contributed by Kelley Cook, June 2004.
# Original code from Neil Booth, May 2003. # Original code from Neil Booth, May 2003.
# #
...@@ -118,9 +118,18 @@ print "" ...@@ -118,9 +118,18 @@ print ""
for (i = 0; i < n_opts; i++) { for (i = 0; i < n_opts; i++) {
opt = opt_args("InverseMask", flags[i]) opt = opt_args("InverseMask", flags[i])
if (opt ~ ",") if (opt ~ ",") {
print "#define TARGET_" nth_arg(1, opt) \ vname = var_name(flags[i])
" ((target_flags & MASK_" nth_arg(0, opt) ") == 0)" macro = "OPTION_"
mask = "OPTION_MASK_"
if (vname == "") {
vname = "target_flags"
macro = "TARGET_"
mask = "MASK_"
}
print "#define " macro nth_arg(1, opt) \
" ((" vname " & " mask nth_arg(0, opt) ") == 0)"
}
} }
print "" print ""
......
2006-02-18 Joseph S. Myers <joseph@codesourcery.com>
* gcc.dg/glibc-uclibc-1.c, gcc.dg/glibc-uclibc-2.c: New tests.
2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com> 2006-02-17 Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
* gcc.dg/cpp/undef3.c: New test. * gcc.dg/cpp/undef3.c: New test.
/* Test -mglibc and -muclibc not allowed together. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do link { target *-*-linux* } } */
/* { dg-options "-mglibc -muclibc" } */
/* { dg-error "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */
/* Test -mglibc and -muclibc not allowed together. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do link { target *-*-linux* } } */
/* { dg-options "-muclibc -mglibc" } */
/* { dg-error "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment