From ee085235e033c00f8164ab81102ccbad369162ee Mon Sep 17 00:00:00 2001 From: jsm28 Date: Thu, 16 Feb 2006 23:29:10 +0000 Subject: gcc: PR target/20353 PR target/24578 PR target/24837 * config/linux.opt: New file. * config/linux.h (CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, LINUX_DYNAMIC_LINKER): Define. (TARGET_C99_FUNCTIONS): Define depending on TARGET_GLIBC. * config.gcc (*-*-linux*): Define extra_options. (*-*-*uclibc*): Define UCLIBC_DEFAULT. (arm*-*-linux-gnueabi): Change to arm*-*-linux-*eabi. * config/arm/linux-eabi.h (LINUX_TARGET_INTERPRETER): Change to GLIBC_DYNAMIC_LINKER. * config/arm/linux-elf.h (LINUX_TARGET_INTERPRETER): Likewise. (LINUX_TARGET_LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Define. (LINK_SPEC): Use LINUX_DYNAMIC_LINKER. * doc/invoke.texi (GNU/Linux Options): New section. gcc/testsuite: * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME): Don't define if __UCLIBC__ is defined. libstdc++-v3: PR libstdc++/14939 * config/os/uclibc/ctype_base.h, config/os/uclibc/ctype_inline.h, config/os/uclibc/ctype_noninline.h, config/os/uclibc/os_defines.h: New. * acinclude.m4 (GLIBCXX_CONFIGURE): Test whether using uClibc. * configure.host: Use os/uclibc for uClibc. * crossconfig.m4 (*-linux*): Use link tests. Don't hardcode presence of math functions. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111160 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/linux.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'gcc/config/linux.h') diff --git a/gcc/config/linux.h b/gcc/config/linux.h index d4527268970..e5707d39623 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, 2004 + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Eric Youngdale. Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). @@ -99,8 +99,24 @@ Boston, MA 02110-1301, USA. */ #define USE_LD_AS_NEEDED 1 #endif +/* Determine which dynamic linker to use depending on whether GLIBC or + uClibc is the default C library and whether -muclibc or -mglibc has + been passed to change the default. */ +#ifdef UCLIBC_DEFAULT +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" +#else +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" +#endif + +/* For most targets with a single dynamic linker the following + definitions suffice; GLIBC_DYNAMIC_LINKER must be defined for each + target using them. */ +#define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" +#define LINUX_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) + /* Determine whether the entire c99 runtime is present in the runtime library. */ -#define TARGET_C99_FUNCTIONS 1 +#define TARGET_C99_FUNCTIONS (TARGET_GLIBC) #define TARGET_POSIX_IO -- cgit v1.2.1