Commit b5a54c03 by Joseph Myers Committed by Joseph Myers

linux.h (OPTION_GLIBC): Define differently if SINGLE_LIBC.

	* config/alpha/linux.h (OPTION_GLIBC): Define differently if
	SINGLE_LIBC.
	* config/linux.h (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC):
	Define differently if SINGLE_LIBC.
	* config/rs6000/linux.h (OPTION_GLIBC): Define differently if
	SINGLE_LIBC.
	* config/rs6000/linux64.h (OPTION_GLIBC): Define differently if
	SINGLE_LIBC.
	* config.gcc (*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu |
	*-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu): Define
	SINGLE_LIBC instead of OPTION_GLIBC.
	(*-*-uclinux*): Define DEFAULT_LIBC and SINGLE_LIBC.
	(bfin*-uclinux*, moxie-*-uclinux*, m68k-*-uclinux*): Don't define
	DEFAULT_LIBC or use linux.opt.

From-SVN: r168094
parent 53855940
2010-12-20 Joseph Myers <joseph@codesourcery.com>
* config/alpha/linux.h (OPTION_GLIBC): Define differently if
SINGLE_LIBC.
* config/linux.h (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC):
Define differently if SINGLE_LIBC.
* config/rs6000/linux.h (OPTION_GLIBC): Define differently if
SINGLE_LIBC.
* config/rs6000/linux64.h (OPTION_GLIBC): Define differently if
SINGLE_LIBC.
* config.gcc (*-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu |
*-*-knetbsd*-gnu | *-*-gnu* | *-*-kopensolaris*-gnu): Define
SINGLE_LIBC instead of OPTION_GLIBC.
(*-*-uclinux*): Define DEFAULT_LIBC and SINGLE_LIBC.
(bfin*-uclinux*, moxie-*-uclinux*, m68k-*-uclinux*): Don't define
DEFAULT_LIBC or use linux.opt.
2010-12-20 Richard Henderson <rth@redhat.com> 2010-12-20 Richard Henderson <rth@redhat.com>
* config/mn10300/mn10300.c (mn10300_legitimize_pic_address): Generate * config/mn10300/mn10300.c (mn10300_legitimize_pic_address): Generate
...@@ -562,7 +562,7 @@ case ${target} in ...@@ -562,7 +562,7 @@ case ${target} in
*linux*) *linux*)
extra_options="$extra_options linux.opt";; extra_options="$extra_options linux.opt";;
*) *)
tm_defines="$tm_defines OPTION_GLIBC=1";; tm_defines="$tm_defines SINGLE_LIBC";;
esac esac
case $target in case $target in
*-*-*android*) *-*-*android*)
...@@ -657,6 +657,7 @@ case ${target} in ...@@ -657,6 +657,7 @@ case ${target} in
;; ;;
*-*-uclinux*) *-*-uclinux*)
use_gcc_stdint=wrap use_gcc_stdint=wrap
tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC SINGLE_LIBC"
;; ;;
*-*-solaris2*) *-*-solaris2*)
extra_options="${extra_options} sol2.opt" extra_options="${extra_options} sol2.opt"
...@@ -909,8 +910,6 @@ bfin*-elf*) ...@@ -909,8 +910,6 @@ bfin*-elf*)
bfin*-uclinux*) bfin*-uclinux*)
tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h" tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/uclinux.h"
tmake_file=bfin/t-bfin-uclinux tmake_file=bfin/t-bfin-uclinux
tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
extra_options="${extra_options} linux.opt"
use_collect2=no use_collect2=no
;; ;;
bfin*-linux-uclibc*) bfin*-linux-uclibc*)
...@@ -992,8 +991,6 @@ moxie-*-uclinux*) ...@@ -992,8 +991,6 @@ moxie-*-uclinux*)
tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h" tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h"
extra_parts="crti.o crtn.o crtbegin.o crtend.o" extra_parts="crti.o crtn.o crtbegin.o crtend.o"
tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp" tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp"
tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
extra_options="${extra_options} linux.opt"
;; ;;
moxie-*-rtems*) moxie-*-rtems*)
tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp t-rtems" tmake_file="${tmake_file} moxie/t-moxie moxie/t-moxie-softfp soft-fp/t-softfp t-rtems"
...@@ -1729,8 +1726,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux ...@@ -1729,8 +1726,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
default_m68k_cpu=68020 default_m68k_cpu=68020
default_cf_cpu=5206 default_cf_cpu=5206
tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h" tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
tm_defines="${tm_defines} MOTOROLA=1 DEFAULT_LIBC=LIBC_UCLIBC" tm_defines="${tm_defines} MOTOROLA=1"
extra_options="${extra_options} linux.opt"
tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs" tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
;; ;;
m68k-*-linux*) # Motorola m68k's running GNU/Linux m68k-*-linux*) # Motorola m68k's running GNU/Linux
......
...@@ -61,7 +61,11 @@ along with GCC; see the file COPYING3. If not see ...@@ -61,7 +61,11 @@ along with GCC; see the file COPYING3. If not see
#undef WCHAR_TYPE #undef WCHAR_TYPE
#define WCHAR_TYPE "int" #define WCHAR_TYPE "int"
#ifdef SINGLE_LIBC
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#else
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
#endif
/* Determine whether the entire c99 runtime is present in the /* Determine whether the entire c99 runtime is present in the
runtime library. */ runtime library. */
......
...@@ -80,9 +80,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see ...@@ -80,9 +80,15 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define LIB_SPEC LINUX_TARGET_LIB_SPEC #define LIB_SPEC LINUX_TARGET_LIB_SPEC
/* C libraries supported on Linux. */ /* C libraries supported on Linux. */
#ifdef SINGLE_LIBC
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC)
#define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC)
#else
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC)
#define OPTION_BIONIC (linux_libc == LIBC_BIONIC) #define OPTION_BIONIC (linux_libc == LIBC_BIONIC)
#endif
#define LINUX_TARGET_OS_CPP_BUILTINS() \ #define LINUX_TARGET_OS_CPP_BUILTINS() \
do { \ do { \
......
...@@ -27,7 +27,11 @@ ...@@ -27,7 +27,11 @@
/* We use glibc _mcount for profiling. */ /* We use glibc _mcount for profiling. */
#define NO_PROFILE_COUNTERS 1 #define NO_PROFILE_COUNTERS 1
#ifdef SINGLE_LIBC
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#else
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
#endif
/* 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
......
...@@ -308,7 +308,11 @@ extern int dot_symbols; ...@@ -308,7 +308,11 @@ extern int dot_symbols;
process. */ process. */
#define OS_MISSING_POWERPC64 !TARGET_64BIT #define OS_MISSING_POWERPC64 !TARGET_64BIT
#ifdef SINGLE_LIBC
#define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC)
#else
#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) #define OPTION_GLIBC (linux_libc == LIBC_GLIBC)
#endif
/* 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
......
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