aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.3/gcc/config.gcc
diff options
context:
space:
mode:
authorJing Yu <jingyu@google.com>2010-07-22 14:39:44 -0700
committerJing Yu <jingyu@google.com>2010-07-22 14:39:44 -0700
commitf01e65905acd1e2052e875130cb723a658765bc8 (patch)
tree59218ed4db7b694046c1a5bf24bfb18005c0edf8 /gcc-4.4.3/gcc/config.gcc
parentb094d6c4bf572654a031ecc4afe675154c886dc5 (diff)
downloadtoolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.tar.gz
toolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.tar.bz2
toolchain_gcc-f01e65905acd1e2052e875130cb723a658765bc8.zip
Backport upstream arm-linux-androideabi target to gcc-4.4.3.
From now on, the general Android toolchain will be arm-linux-androideabi. arm-eabi toolchain built from this source does not contain Android specific configurations and will only be used to build Android kernel. Read recent changes in toolchain/build/README for more details. Change-Id: I7526576949b55809da5c24d34e1df884301c05b2
Diffstat (limited to 'gcc-4.4.3/gcc/config.gcc')
-rw-r--r--gcc-4.4.3/gcc/config.gcc224
1 files changed, 113 insertions, 111 deletions
diff --git a/gcc-4.4.3/gcc/config.gcc b/gcc-4.4.3/gcc/config.gcc
index aefe618f4..1a5315bce 100644
--- a/gcc-4.4.3/gcc/config.gcc
+++ b/gcc-4.4.3/gcc/config.gcc
@@ -498,25 +498,47 @@ case ${target} in
*-*-gnu*)
tmake_file="$tmake_file t-gnu";;
esac
- # glibc / uclibc switch. uclibc isn't usable for GNU/Hurd and neither for
- # GNU/k*BSD.
+ # Common C libraries.
+ tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3"
+ # glibc / uclibc / bionic switch.
+ # uclibc and bionic aren't usable for GNU/Hurd and neither for GNU/k*BSD.
case $target in
*linux*)
extra_options="$extra_options linux.opt";;
*)
tm_defines="$tm_defines OPTION_GLIBC=1";;
esac
- case ${target} in
+ case $target in
+ *-*-*android*)
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_BIONIC"
+ ;;
*-*-*uclibc*)
- tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC"
;;
*)
- tm_defines="${tm_defines} UCLIBC_DEFAULT=0"
+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC"
;;
esac
- # Assume that glibc or uClibc are being used and so __cxa_atexit is provided.
+ # Assume that glibc or uClibc or Bionic are being used and so __cxa_atexit
+ # is provided.
default_use_cxa_atexit=yes
use_gcc_tgmath=no
+ # Add Android userspace support to Linux targets.
+ case $target in
+ *linux*)
+ tm_file="$tm_file linux-android.h"
+ extra_options="$extra_options linux-android.opt"
+ ;;
+ esac
+ # Enable compilation for Android by default for *android* targets.
+ case $target in
+ *-*-*android*)
+ tm_defines="$tm_defines ANDROID_DEFAULT=1"
+ ;;
+ *)
+ tm_defines="$tm_defines ANDROID_DEFAULT=0"
+ ;;
+ esac
;;
*-*-netbsd*)
tmake_file="t-slibgcc-elf-ver t-libc-ok t-netbsd t-libgcc-pic"
@@ -705,112 +727,92 @@ arm*-*-netbsd*)
extra_parts=""
use_collect2=yes
;;
-arm*-*-linux* | arm*-*-uclinux* | arm*-*-ecos-elf | \
-arm*-*-eabi* | arm*-*-symbianelf* | arm*-*-rtems | arm*-*-elf)
- # These targets share t-arm-elf.
- arm_multilibs=${with_multilib_list}
- arm_multilibs=`echo $arm_multilibs | sed -e 's/,/ /g' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ_ abcdefghijklmnopqrstuvwxyz-`
- if test "$arm_multilibs" != "default"; then
- tmlib_file=""
- for arm_multilib in ${arm_multilibs}; do
- case ${arm_multilib} in
- mandroid | armv7a)
- tmlib_file="${tmlib_file} arm/t-mlib-${arm_multilib}"
- ;;
- \!*)
- echo "with_multilib_list=${arm_multilib} is ignored."
- ;;
- *)
- echo "with_multilib_list=${arm_multilib} not supported."
- exit 1
- ;;
- esac
- done
- fi
+arm*-*-linux*) # ARM GNU/Linux with ELF
+ tm_file="dbxelf.h elfos.h linux.h linux-android.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"
+ ;;
+ esac
+ tmake_file="${tmake_file} t-linux arm/t-arm"
case ${target} in
- arm*-*-linux*) # ARM GNU/Linux with ELF
- tm_file="dbxelf.h elfos.h linux.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"
- ;;
- esac
- tmake_file="${tmake_file} t-linux arm/t-arm"
- case ${target} in
- arm*-*-linux-*eabi)
- tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
- tmake_file="$tmake_file ${tmlib_file} arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
- # The BPABI long long divmod functions return a 128-bit value in
- # registers r0-r3. Correctly modeling that requires the use of
- # TImode.
- need_64bit_hwint=yes
- # The EABI requires the use of __cxa_atexit.
- default_use_cxa_atexit=yes
- ;;
- *)
- tmake_file="$tmake_file arm/t-linux"
- ;;
- esac
- tm_file="$tm_file arm/aout.h arm/arm.h"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
- ;;
- arm*-*-uclinux*) # ARM ucLinux
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
- tmake_file="arm/t-arm ${tmlib_file} arm/t-arm-elf"
- case ${target} in
- arm*-*-uclinux*eabi)
- tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
- tmake_file="$tmake_file arm/t-bpabi"
- # The BPABI long long divmod functions return a 128-bit value in
- # registers r0-r3. Correctly modeling that requires the use of
- # TImode.
- need_64bit_hwint=yes
- # The EABI requires the use of __cxa_atexit.
- default_use_cxa_atexit=yes
- esac
- tm_file="$tm_file arm/aout.h arm/arm.h"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
- ;;
- arm*-*-ecos-elf)
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
- tmake_file="arm/t-arm ${tmlib_file} arm/t-arm-elf"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
- ;;
- arm*-*-eabi* | arm*-*-symbianelf* )
- # The BPABI long long divmod functions return a 128-bit value in
- # registers r0-r3. Correctly modeling that requires the use of
- # TImode.
- need_64bit_hwint=yes
- default_use_cxa_atexit=yes
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
- tmake_file="arm/t-arm ${tmlib_file} arm/t-arm-elf"
- case ${target} in
- arm*-*-eabi*)
- tm_file="$tm_file arm/eabi.h"
- tmake_file="${tmake_file} arm/t-bpabi"
- extra_options="${extra_options} arm/eabi.opt"
- ;;
- arm*-*-symbianelf*)
- tm_file="${tm_file} arm/symbian.h"
- # We do not include t-bpabi for Symbian OS because the system
- # provides its own implementation of the BPABI functions.
- tmake_file="${tmake_file} arm/t-symbian"
- ;;
- esac
- tm_file="${tm_file} arm/aout.h arm/arm.h"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
- ;;
- arm*-*-rtems*)
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
- tmake_file="arm/t-arm ${tmlib_file} arm/t-arm-elf t-rtems arm/t-rtems"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
- ;;
- arm*-*-elf)
- tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
- tmake_file="arm/t-arm ${tmlib_file} arm/t-arm-elf"
- tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
+ # Define multilib configuration for arm-linux-androideabi.
+ case ${target} in
+ *-androideabi)
+ tmake_file="$tmake_file arm/t-linux-androideabi"
;;
+ esac
+ # The BPABI long long divmod functions return a 128-bit value in
+ # registers r0-r3. Correctly modeling that requires the use of
+ # TImode.
+ need_64bit_hwint=yes
+ # The EABI requires the use of __cxa_atexit.
+ default_use_cxa_atexit=yes
+ ;;
+ *)
+ tmake_file="$tmake_file arm/t-linux"
+ ;;
+ esac
+ tm_file="$tm_file arm/aout.h arm/arm.h"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
+arm*-*-uclinux*) # ARM ucLinux
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/linux-gas.h arm/uclinux-elf.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ case ${target} in
+ arm*-*-uclinux*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/uclinux-eabi.h"
+ tmake_file="$tmake_file arm/t-bpabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+ # registers r0-r3. Correctly modeling that requires the use of
+ # TImode.
+ need_64bit_hwint=yes
+ # The EABI requires the use of __cxa_atexit.
+ default_use_cxa_atexit=yes
+ esac
+ tm_file="$tm_file arm/aout.h arm/arm.h"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
+arm*-*-ecos-elf)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
+arm*-*-eabi* | arm*-*-symbianelf* )
+ # The BPABI long long divmod functions return a 128-bit value in
+ # registers r0-r3. Correctly modeling that requires the use of
+ # TImode.
+ need_64bit_hwint=yes
+ default_use_cxa_atexit=yes
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/bpabi.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ case ${target} in
+ arm*-*-eabi*)
+ tm_file="$tm_file"
+ tmake_file="${tmake_file} arm/t-bpabi"
+ ;;
+ arm*-*-symbianelf*)
+ tm_file="${tm_file} arm/symbian.h"
+ # We do not include t-bpabi for Symbian OS because the system
+ # provides its own implementation of the BPABI functions.
+ tmake_file="${tmake_file} arm/t-symbian"
+ ;;
esac
+ tm_file="${tm_file} arm/aout.h arm/arm.h"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
+arm*-*-rtems*)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
+ tmake_file="arm/t-arm arm/t-arm-elf t-rtems arm/t-rtems"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
+ ;;
+arm*-*-elf)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+ tmake_file="arm/t-arm arm/t-arm-elf"
+ tmake_file="${tmake_file} arm/t-arm-softfp soft-fp/t-softfp"
;;
arm*-wince-pe*)
tm_file="arm/semi.h arm/aout.h arm/arm.h arm/coff.h dbxcoff.h arm/pe.h arm/wince-pe.h"
@@ -839,7 +841,7 @@ bfin*-elf*)
bfin*-uclinux*)
tm_file="${tm_file} dbxelf.h elfos.h bfin/elf.h linux.h bfin/uclinux.h"
tmake_file=bfin/t-bfin-uclinux
- tm_defines="${tm_defines} UCLIBC_DEFAULT=1"
+ tm_defines="${tm_defines} DEFAULT_LIBC=LIBC_UCLIBC"
extra_options="${extra_options} linux.opt"
use_collect2=no
;;
@@ -1520,7 +1522,7 @@ m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux
default_m68k_cpu=68020
default_cf_cpu=5206
tm_file="${tm_file} dbxelf.h elfos.h svr4.h linux.h flat.h m68k/linux.h m68k/uclinux.h ./sysroot-suffix.h"
- tm_defines="${tm_defines} MOTOROLA=1 UCLIBC_DEFAULT=1"
+ tm_defines="${tm_defines} MOTOROLA=1 DEFAULT_LIBC=LIBC_UCLIBC"
extra_options="${extra_options} linux.opt"
tmake_file="m68k/t-floatlib m68k/t-uclinux m68k/t-mlibs"
;;