diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-12 14:29:14 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-12 14:29:14 +0000 |
commit | deb14f24f54a7cdc7025362667ed3a3821ddc7d0 (patch) | |
tree | ff08d18c3d28c2afe4a515b7f6be1be610e755a3 | |
parent | 5c70c066d7fd897f15f11793ecb5a958b5d3eb54 (diff) | |
download | gcc-deb14f24f54a7cdc7025362667ed3a3821ddc7d0.tar.gz |
* config.gcc (arm*-*-linux*, bfin*-uclinux*, bfin*-linux-uclibc*,
crisv32-*-linux* | cris-*-linux*, frv-*-*linux*, moxie-*-uclinux*,
hppa*64*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux* |
i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu |
i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu,
x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu,
ia64*-*-linux*, lm32-*-uclinux*, m32r-*-linux*, m32rle-*-linux*,
m68k-*-uclinux*, m68k-*-linux*, microblaze*-linux*,
mips64*-*-linux* | mipsisa64*-*-linux*, mips*-*-linux*,
s390-*-linux*, s390x-*-linux*, sh*-*-linux*, sparc-*-linux*,
sparc64-*-linux*, vax-*-linux*, xtensa*-*-linux*,
am33_2.0-*-linux*): Use gnu-user.h before linux.h.
* config/gnu-user.h: New. Copied from linux.h.
(LINUX_TARGET_STARTFILE_SPEC): Rename to
GNU_USER_TARGET_STARTFILE_SPEC.
(LINUX_TARGET_ENDFILE_SPEC): Rename to
GNU_USER_TARGET_ENDFILE_SPEC.
(LINUX_TARGET_CC1_SPEC): Rename to GNU_USER_TARGET_CC1_SPEC.
(LINUX_TARGET_LIB_SPEC): Rename to GNU_USER_TARGET_LIB_SPEC.
(OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC,
LINUX_TARGET_OS_CPP_BUILTINS, CHOOSE_DYNAMIC_LINKER1,
CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER,
UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64,
BIONIC_DYNAMIC_LINKER, BIONIC_DYNAMIC_LINKER32,
BIONIC_DYNAMIC_LINKER64, LINUX_DYNAMIC_LINKER,
LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64,
TARGET_C99_FUNCTIONS, TARGET_HAS_SINCOS): Remove.
* config/arm/linux-eabi.h (CC1_SPEC): Use
GNU_USER_TARGET_CC1_SPEC.
(LIB_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
(STARTFILE_SPEC): Use GNU_USER_TARGET_STARTFILE_SPEC.
(ENDFILE_SPEC): Use GNU_USER_TARGET_ENDFILE_SPEC
* config/linux.h (NO_IMPLICIT_EXTERN_C, ASM_APP_ON, ASM_APP_OFF,
LINUX_TARGET_STARTFILE_SPEC, STARTFILE_SPEC,
LINUX_TARGET_ENDFILE_SPEC, ENDFILE_SPEC, LINUX_TARGET_CC1_SPEC,
CC1_SPEC, CPLUSPLUS_CPP_SPEC, LINUX_TARGET_LIB_SPEC, LIB_SPEC,
LINK_EH_SPEC, LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): Remove.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168711 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 40 | ||||
-rw-r--r-- | gcc/config.gcc | 54 | ||||
-rw-r--r-- | gcc/config/arm/linux-eabi.h | 18 | ||||
-rw-r--r-- | gcc/config/gnu-user.h | 97 | ||||
-rw-r--r-- | gcc/config/linux.h | 76 |
5 files changed, 178 insertions, 107 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5cd40fa896c..7181f961241 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,43 @@ +2011-01-12 Joseph Myers <joseph@codesourcery.com> + + * config.gcc (arm*-*-linux*, bfin*-uclinux*, bfin*-linux-uclibc*, + crisv32-*-linux* | cris-*-linux*, frv-*-*linux*, moxie-*-uclinux*, + hppa*64*-*-linux*, hppa*-*-linux*, i[34567]86-*-linux* | + i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | + i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu, + x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu, + ia64*-*-linux*, lm32-*-uclinux*, m32r-*-linux*, m32rle-*-linux*, + m68k-*-uclinux*, m68k-*-linux*, microblaze*-linux*, + mips64*-*-linux* | mipsisa64*-*-linux*, mips*-*-linux*, + s390-*-linux*, s390x-*-linux*, sh*-*-linux*, sparc-*-linux*, + sparc64-*-linux*, vax-*-linux*, xtensa*-*-linux*, + am33_2.0-*-linux*): Use gnu-user.h before linux.h. + * config/gnu-user.h: New. Copied from linux.h. + (LINUX_TARGET_STARTFILE_SPEC): Rename to + GNU_USER_TARGET_STARTFILE_SPEC. + (LINUX_TARGET_ENDFILE_SPEC): Rename to + GNU_USER_TARGET_ENDFILE_SPEC. + (LINUX_TARGET_CC1_SPEC): Rename to GNU_USER_TARGET_CC1_SPEC. + (LINUX_TARGET_LIB_SPEC): Rename to GNU_USER_TARGET_LIB_SPEC. + (OPTION_GLIBC, OPTION_UCLIBC, OPTION_BIONIC, + LINUX_TARGET_OS_CPP_BUILTINS, CHOOSE_DYNAMIC_LINKER1, + CHOOSE_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, + UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64, + BIONIC_DYNAMIC_LINKER, BIONIC_DYNAMIC_LINKER32, + BIONIC_DYNAMIC_LINKER64, LINUX_DYNAMIC_LINKER, + LINUX_DYNAMIC_LINKER32, LINUX_DYNAMIC_LINKER64, + TARGET_C99_FUNCTIONS, TARGET_HAS_SINCOS): Remove. + * config/arm/linux-eabi.h (CC1_SPEC): Use + GNU_USER_TARGET_CC1_SPEC. + (LIB_SPEC): Use GNU_USER_TARGET_LIB_SPEC. + (STARTFILE_SPEC): Use GNU_USER_TARGET_STARTFILE_SPEC. + (ENDFILE_SPEC): Use GNU_USER_TARGET_ENDFILE_SPEC + * config/linux.h (NO_IMPLICIT_EXTERN_C, ASM_APP_ON, ASM_APP_OFF, + LINUX_TARGET_STARTFILE_SPEC, STARTFILE_SPEC, + LINUX_TARGET_ENDFILE_SPEC, ENDFILE_SPEC, LINUX_TARGET_CC1_SPEC, + CC1_SPEC, CPLUSPLUS_CPP_SPEC, LINUX_TARGET_LIB_SPEC, LIB_SPEC, + LINK_EH_SPEC, LINK_GCC_C_SEQUENCE_SPEC, USE_LD_AS_NEEDED): Remove. + 2011-01-12 Richard Guenther <rguenther@suse.de> PR other/46946 diff --git a/gcc/config.gcc b/gcc/config.gcc index 198016ecc47..0f6aae17717 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -789,7 +789,7 @@ arm*-*-netbsd*) use_collect2=yes ;; arm*-*-linux*) # ARM GNU/Linux with ELF - tm_file="dbxelf.h elfos.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" + tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h" case $target in arm*b-*) tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1" @@ -910,12 +910,12 @@ bfin*-elf*) use_collect2=no ;; 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 gnu-user.h linux.h glibc-stdint.h bfin/uclinux.h" tmake_file=bfin/t-bfin-uclinux use_collect2=no ;; bfin*-linux-uclibc*) - tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h" + tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h gnu-user.h linux.h glibc-stdint.h bfin/linux.h ./linux-sysroot-suffix.h" tmake_file="t-slibgcc-elf-ver bfin/t-bfin-linux" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" use_collect2=no @@ -946,7 +946,7 @@ cris-*-elf | cris-*-none) use_gcc_stdint=wrap ;; crisv32-*-linux* | cris-*-linux*) - tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h cris/linux.h" + tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h cris/linux.h" # We need to avoid using t-linux, so override default tmake_file tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" extra_options="${extra_options} cris/linux.opt" @@ -976,7 +976,7 @@ frv-*-elf) ;; frv-*-*linux*) tm_file="dbxelf.h elfos.h ${tm_file} \ - linux.h glibc-stdint.h frv/linux.h" + gnu-user.h linux.h glibc-stdint.h frv/linux.h" tm_file="${tm_file} ../../libgcc/config/frv/frv-abi.h" tmake_file="${tmake_file} frv/t-frv frv/t-linux" ;; @@ -990,7 +990,7 @@ moxie-*-elf) moxie-*-uclinux*) gas=yes gnu_ld=yes - tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h moxie/uclinux.h" + tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h glibc-stdint.h moxie/uclinux.h" 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" ;; @@ -1008,7 +1008,7 @@ h8300-*-elf*) ;; hppa*64*-*-linux*) target_cpu_default="MASK_PA_11|MASK_PA_20" - tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h linux.h \ + tm_file="pa/pa64-start.h ${tm_file} dbxelf.h elfos.h gnu-user.h linux.h \ glibc-stdint.h pa/pa-linux.h pa/pa64-regs.h pa/pa-64.h \ pa/pa64-linux.h" tmake_file="${tmake_file} pa/t-linux64" @@ -1017,7 +1017,7 @@ hppa*64*-*-linux*) ;; hppa*-*-linux*) target_cpu_default="MASK_PA_11|MASK_NO_SPACE_REGS" - tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h pa/pa-linux.h \ + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h pa/pa-linux.h \ pa/pa32-regs.h pa/pa32-linux.h" tmake_file="${tmake_file} pa/t-linux t-slibgcc-libgcc" # Set the libgcc version number @@ -1225,7 +1225,7 @@ i[34567]86-*-openbsd*) i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i[34567]86-*-gnu* | i[34567]86-*-kopensolaris*-gnu) # Intel 80386's running GNU/* # with ELF format using glibc 2 - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h linux.h glibc-stdint.h" + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" case ${target} in i[34567]86-*-linux*) # Assume modern glibc @@ -1262,7 +1262,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules" ;; x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu) - tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h linux.h glibc-stdint.h \ + tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h \ i386/x86-64.h i386/linux64.h" case ${target} in x86_64-*-linux*) @@ -1560,7 +1560,7 @@ ia64*-*-freebsd*) extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o crtfastmath.o" ;; ia64*-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h" + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ia64/sysv4.h ia64/linux.h" tmake_file="${tmake_file} ia64/t-ia64 t-libunwind ia64/t-glibc" if test x$with_system_libunwind != xyes ; then tmake_file="${tmake_file} t-libunwind-elf ia64/t-glibc-libunwind" @@ -1614,7 +1614,7 @@ lm32-*-rtems*) tmake_file="${tmake_file} t-rtems" ;; lm32-*-uclinux*) - tm_file="dbxelf.h elfos.h ${tm_file} linux.h lm32/uclinux-elf.h" + tm_file="dbxelf.h elfos.h ${tm_file} gnu-user.h linux.h lm32/uclinux-elf.h" tmake_file="${tmake_file} lm32/t-lm32 lm32/t-fprules-softfp soft-fp/t-softfp" ;; m32r-*-elf*) @@ -1631,7 +1631,7 @@ m32r-*-rtems*) extra_parts="crtinit.o crtfini.o" ;; m32r-*-linux*) - tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h" + tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} m32r/linux.h" # We override the tmake_file for linux -- why? tmake_file="t-slibgcc-elf-ver m32r/t-linux" gnu_ld=yes @@ -1640,7 +1640,7 @@ m32r-*-linux*) fi ;; m32rle-*-linux*) - tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h" + tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m32r/little.h ${tm_file} m32r/linux.h" # We override the tmake_file for linux -- why? tmake_file="t-slibgcc-elf-ver m32r/t-linux" gnu_ld=yes @@ -1730,7 +1730,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux # ABI. default_m68k_cpu=68020 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 gnu-user.h linux.h glibc-stdint.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h" tm_defines="${tm_defines} MOTOROLA=1" tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs" ;; @@ -1740,7 +1740,7 @@ m68k-*-linux*) # Motorola m68k's running GNU/Linux default_m68k_cpu=68020 default_cf_cpu=5475 with_arch=${with_arch:-m68k} - tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h" + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h m68k/linux.h ./sysroot-suffix.h" extra_options="${extra_options} m68k/ieee.opt" tm_defines="${tm_defines} MOTOROLA=1" tmake_file="${tmake_file} m68k/t-floatlib m68k/t-linux m68k/t-mlibs" @@ -1782,7 +1782,7 @@ mep-*-*) use_gcc_stdint=wrap ;; microblaze*-linux*) - tm_file="${tm_file} dbxelf.h linux.h microblaze/linux.h" + tm_file="${tm_file} dbxelf.h gnu-user.h linux.h microblaze/linux.h" c_target_objs="${c_target_objs} microblaze-c.o" cxx_target_objs="${cxx_target_objs} microblaze-c.o" tmake_file="${tmake_file} t-slibgcc-elf-ver t-slibgcc-nolc-override t-linux microblaze/t-microblaze" @@ -1820,7 +1820,7 @@ mips*-*-netbsd*) # NetBSD/mips, either endian. extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; mips64*-*-linux* | mipsisa64*-*-linux*) - tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h" + tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h mips/linux64.h" tmake_file="${tmake_file} mips/t-linux64 mips/t-libgcc-mips16" tm_defines="${tm_defines} MIPS_ABI_DEFAULT=ABI_N32" case ${target} in @@ -1842,7 +1842,7 @@ mips64*-*-linux* | mipsisa64*-*-linux*) test x$with_llsc != x || with_llsc=yes ;; mips*-*-linux*) # Linux MIPS, either endian. - tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h ${tm_file} mips/linux.h" + tm_file="dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h ${tm_file} mips/linux.h" tmake_file="${tmake_file} mips/t-libgcc-mips16" case ${target} in mipsisa32r2*) @@ -2244,10 +2244,10 @@ rx-*-elf*) tmake_file="${tmake_file} rx/t-rx" ;; s390-*-linux*) - tm_file="s390/s390.h dbxelf.h elfos.h linux.h glibc-stdint.h s390/linux.h" + tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h" ;; s390x-*-linux*) - tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h linux.h glibc-stdint.h s390/linux.h" + tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h" tm_p_file=s390/s390-protos.h md_file=s390/s390.md extra_modes=s390/s390-modes.def @@ -2302,7 +2302,7 @@ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \ tm_file="${tm_file} dbxelf.h elfos.h sh/elf.h" case ${target} in sh*-*-linux*) tmake_file="${tmake_file} sh/t-linux" - tm_file="${tm_file} linux.h glibc-stdint.h sh/linux.h" ;; + tm_file="${tm_file} gnu-user.h linux.h glibc-stdint.h sh/linux.h" ;; sh*-*-netbsd*) tm_file="${tm_file} netbsd.h netbsd-elf.h sh/netbsd-elf.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" @@ -2485,7 +2485,7 @@ sparc-*-rtems*) extra_parts="crtbegin.o crtend.o" ;; sparc-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h linux.h glibc-stdint.h" + tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h" extra_options="${extra_options} sparc/long-double-switch.opt" case ${target} in *-leon-*) @@ -2579,7 +2579,7 @@ sparc64-*-rtems*) extra_parts="crtbegin.o crtend.o" ;; sparc64-*-linux*) - tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h linux.h glibc-stdint.h sparc/linux64.h" + tm_file="sparc/biarch64.h ${tm_file} dbxelf.h elfos.h sparc/sysv4.h gnu-user.h linux.h glibc-stdint.h sparc/linux64.h" extra_options="${extra_options} sparc/long-double-switch.opt" tmake_file="${tmake_file} sparc/t-linux sparc/t-linux64 sparc/t-crtfm" ;; @@ -2666,7 +2666,7 @@ v850-*-*) use_gcc_stdint=wrap ;; vax-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h linux.h vax/elf.h vax/linux.h" + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h vax/elf.h vax/linux.h" tmake_file="${tmake_file} vax/t-linux" ;; vax-*-netbsdelf*) @@ -2700,11 +2700,11 @@ xtensa*-*-elf*) tmake_file="xtensa/t-xtensa xtensa/t-elf" ;; xtensa*-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h linux.h glibc-stdint.h xtensa/linux.h" + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h" tmake_file="${tmake_file} xtensa/t-xtensa xtensa/t-linux" ;; am33_2.0-*-linux*) - tm_file="mn10300/mn10300.h dbxelf.h elfos.h linux.h glibc-stdint.h mn10300/linux.h" + tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h" tmake_file="${tmake_file} mn10300/t-linux" gas=yes gnu_ld=yes extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h index 8eea96f949e..8330052844f 100644 --- a/gcc/config/arm/linux-eabi.h +++ b/gcc/config/arm/linux-eabi.h @@ -1,5 +1,5 @@ /* Configuration file for ARM GNU/Linux EABI targets. - Copyright (C) 2004, 2005, 2006, 2007, 2010 + Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by CodeSourcery, LLC @@ -72,25 +72,25 @@ LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC) #undef CC1_SPEC -#define CC1_SPEC \ - LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \ - LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) +#define CC1_SPEC \ + LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \ + GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC) #define CC1PLUS_SPEC \ LINUX_OR_ANDROID_CC ("", ANDROID_CC1PLUS_SPEC) #undef LIB_SPEC -#define LIB_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_LIB_SPEC, \ - LINUX_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) +#define LIB_SPEC \ + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_LIB_SPEC, \ + GNU_USER_TARGET_LIB_SPEC " " ANDROID_LIB_SPEC) #undef STARTFILE_SPEC #define STARTFILE_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) #undef ENDFILE_SPEC #define ENDFILE_SPEC \ - LINUX_OR_ANDROID_LD (LINUX_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) + LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) /* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we do not use -lfloat. */ diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h new file mode 100644 index 00000000000..1c4e71d1bb4 --- /dev/null +++ b/gcc/config/gnu-user.h @@ -0,0 +1,97 @@ +/* Definitions for systems using, at least optionally, a GNU + (glibc-based) userspace or other userspace with libc derived from + glibc (e.g. uClibc) or for which similar specs are appropriate. + Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, + 2007, 2009, 2010, 2011 Free Software Foundation, Inc. + Contributed by Eric Youngdale. + Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. + +GCC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +Under Section 7 of GPL version 3, you are granted additional +permissions described in the GCC Runtime Library Exception, version +3.1, as published by the Free Software Foundation. + +You should have received a copy of the GNU General Public License and +a copy of the GCC Runtime Library Exception along with this program; +see the files COPYING3 and COPYING.RUNTIME respectively. If not, see +<http://www.gnu.org/licenses/>. */ + +/* Don't assume anything about the header files. */ +#define NO_IMPLICIT_EXTERN_C + +#undef ASM_APP_ON +#define ASM_APP_ON "#APP\n" + +#undef ASM_APP_OFF +#define ASM_APP_OFF "#NO_APP\n" + +/* Provide a STARTFILE_SPEC appropriate for GNU userspace. Here we add + the GNU userspace magical crtbegin.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main'. */ + +#if defined HAVE_LD_PIE +#define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" +#else +#define GNU_USER_TARGET_STARTFILE_SPEC \ + "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ + crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" +#endif +#undef STARTFILE_SPEC +#define STARTFILE_SPEC GNU_USER_TARGET_STARTFILE_SPEC + +/* Provide a ENDFILE_SPEC appropriate for GNU userspace. Here we tack on + the GNU userspace magical crtend.o file (see crtstuff.c) which + provides part of the support for getting C++ file-scope static + object constructed before entering `main', followed by a normal + GNU userspace "finalizer" file, `crtn.o'. */ + +#define GNU_USER_TARGET_ENDFILE_SPEC \ + "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" +#undef ENDFILE_SPEC +#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC + +/* This is for -profile to use -lc_p instead of -lc. */ +#define GNU_USER_TARGET_CC1_SPEC "%{profile:-p}" +#ifndef CC1_SPEC +#define CC1_SPEC GNU_USER_TARGET_CC1_SPEC +#endif + +/* The GNU C++ standard library requires that these macros be defined. */ +#undef CPLUSPLUS_CPP_SPEC +#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" + +#define GNU_USER_TARGET_LIB_SPEC \ + "%{pthread:-lpthread} \ + %{shared:-lc} \ + %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" +#undef LIB_SPEC +#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC + +#if defined(HAVE_LD_EH_FRAME_HDR) +#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " +#endif + +#undef LINK_GCC_C_SEQUENCE_SPEC +#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 + +#define TARGET_POSIX_IO diff --git a/gcc/config/linux.h b/gcc/config/linux.h index d53468e4e2e..00b4f1c1cd5 100644 --- a/gcc/config/linux.h +++ b/gcc/config/linux.h @@ -1,6 +1,9 @@ -/* Definitions for Linux-based GNU systems with ELF format +/* Definitions for systems using the Linux kernel, with or without + MMU, using ELF at the compiler level but possibly FLT for final + linked executables and shared libraries in some no-MMU cases, and + possibly with a choice of libc implementations. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003, 2004, 2005, 2006, - 2007, 2009, 2010 Free Software Foundation, Inc. + 2007, 2009, 2010, 2011 Free Software Foundation, Inc. Contributed by Eric Youngdale. Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). @@ -25,60 +28,6 @@ a copy of the GCC Runtime Library Exception along with this program; see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -/* Don't assume anything about the header files. */ -#define NO_IMPLICIT_EXTERN_C - -#undef ASM_APP_ON -#define ASM_APP_ON "#APP\n" - -#undef ASM_APP_OFF -#define ASM_APP_OFF "#NO_APP\n" - -/* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add - the GNU/Linux magical crtbegin.o file (see crtstuff.c) which - provides part of the support for getting C++ file-scope static - object constructed before entering `main'. */ - -#if defined HAVE_LD_PIE -#define LINUX_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -#else -#define LINUX_TARGET_STARTFILE_SPEC \ - "%{!shared: %{pg|p|profile:gcrt1.o%s;:crt1.o%s}} \ - crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}" -#endif -#undef STARTFILE_SPEC -#define STARTFILE_SPEC LINUX_TARGET_STARTFILE_SPEC - -/* Provide a ENDFILE_SPEC appropriate for GNU/Linux. Here we tack on - the GNU/Linux magical crtend.o file (see crtstuff.c) which - provides part of the support for getting C++ file-scope static - object constructed before entering `main', followed by a normal - GNU/Linux "finalizer" file, `crtn.o'. */ - -#define LINUX_TARGET_ENDFILE_SPEC \ - "%{shared|pie:crtendS.o%s;:crtend.o%s} crtn.o%s" -#undef ENDFILE_SPEC -#define ENDFILE_SPEC LINUX_TARGET_ENDFILE_SPEC - -/* This is for -profile to use -lc_p instead of -lc. */ -#define LINUX_TARGET_CC1_SPEC "%{profile:-p}" -#ifndef CC1_SPEC -#define CC1_SPEC LINUX_TARGET_CC1_SPEC -#endif - -/* The GNU C++ standard library requires that these macros be defined. */ -#undef CPLUSPLUS_CPP_SPEC -#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)" - -#define LINUX_TARGET_LIB_SPEC \ - "%{pthread:-lpthread} \ - %{shared:-lc} \ - %{!shared:%{mieee-fp:-lieee} %{profile:-lc_p}%{!profile:-lc}}" -#undef LIB_SPEC -#define LIB_SPEC LINUX_TARGET_LIB_SPEC - /* C libraries supported on Linux. */ #ifdef SINGLE_LIBC #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) @@ -101,19 +50,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see builtin_assert ("system=posix"); \ } while (0) -#if defined(HAVE_LD_EH_FRAME_HDR) -#define LINK_EH_SPEC "%{!static:--eh-frame-hdr} " -#endif - -#undef LINK_GCC_C_SEQUENCE_SPEC -#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 which dynamic linker to use depending on whether GLIBC or uClibc or Bionic is the default C library and whether -muclibc or -mglibc or -mbionic has been passed to change the default. */ @@ -161,5 +97,3 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see /* Whether we have sincos that follows the GNU extension. */ #define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC) - -#define TARGET_POSIX_IO |