diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-18 11:12:51 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-18 11:12:51 +0000 |
commit | c490c13baa38aacc4bcd54504f551f4264564082 (patch) | |
tree | 24e5855f0f1d491300e0a47d368c1fd5001bc77d /gcc/config/sparc/linux64.h | |
parent | cca5dddcda2bd7053ca800e0f33bd2e6676ee3df (diff) | |
download | gcc-c490c13baa38aacc4bcd54504f551f4264564082.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111235 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/sparc/linux64.h')
-rw-r--r-- | gcc/config/sparc/linux64.h | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index a190c1654b1..a6244f1ed8a 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -1,5 +1,5 @@ /* 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. Contributed by David S. Miller (davem@caip.rutgers.edu) @@ -143,6 +143,20 @@ Boston, MA 02110-1301, USA. */ /* 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 #undef SUBTARGET_EXTRA_SPECS @@ -151,13 +165,13 @@ Boston, MA 02110-1301, USA. */ { "link_arch64", LINK_ARCH64_SPEC }, \ { "link_arch_default", LINK_ARCH_DEFAULT_SPEC }, \ { "link_arch", LINK_ARCH_SPEC }, - + #define LINK_ARCH32_SPEC "-m elf32_sparc -Y P,/usr/lib %{shared:-shared} \ %{!shared: \ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER32 "}} \ %{static:-static}}} \ " @@ -166,7 +180,7 @@ Boston, MA 02110-1301, USA. */ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \ %{static:-static}}} \ " @@ -247,7 +261,7 @@ Boston, MA 02110-1301, USA. */ %{!ibcs: \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib64/ld-linux.so.2}} \ + %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER64 "}} \ %{static:-static}}} \ %{mlittle-endian:-EL} \ %{!mno-relax:%{!r:-relax}} \ @@ -330,7 +344,7 @@ do { \ /* Determine whether the entire c99 runtime is present in the runtime library. */ -#define TARGET_C99_FUNCTIONS 1 +#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) #define TARGET_POSIX_IO |