From f01e65905acd1e2052e875130cb723a658765bc8 Mon Sep 17 00:00:00 2001 From: Jing Yu Date: Thu, 22 Jul 2010 14:39:44 -0700 Subject: 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 --- gcc-4.4.3/README.google | 44 ++++ gcc-4.4.3/config.sub | 8 +- gcc-4.4.3/gcc/config.gcc | 224 +++++++++++---------- gcc-4.4.3/gcc/config/alpha/linux-elf.h | 8 +- gcc-4.4.3/gcc/config/alpha/linux.h | 2 + gcc-4.4.3/gcc/config/arm/arm.h | 4 +- gcc-4.4.3/gcc/config/arm/eabi.h | 132 ------------ gcc-4.4.3/gcc/config/arm/eabi.opt | 23 --- gcc-4.4.3/gcc/config/arm/linux-eabi.h | 25 ++- gcc-4.4.3/gcc/config/arm/t-arm-elf | 4 - gcc-4.4.3/gcc/config/arm/t-linux-androideabi | 10 + gcc-4.4.3/gcc/config/arm/t-mlib-armv7a | 4 - gcc-4.4.3/gcc/config/arm/t-mlib-mandroid | 5 - gcc-4.4.3/gcc/config/linux-android.h | 54 +++++ gcc-4.4.3/gcc/config/linux-android.opt | 23 +++ gcc-4.4.3/gcc/config/linux.h | 72 +++++-- gcc-4.4.3/gcc/config/linux.opt | 12 +- gcc-4.4.3/gcc/config/rs6000/linux.h | 2 + gcc-4.4.3/gcc/config/rs6000/linux64.h | 10 +- gcc-4.4.3/gcc/config/rs6000/sysv4.h | 8 +- gcc-4.4.3/gcc/doc/invoke.texi | 72 ++++--- gcc-4.4.3/gcc/gthr-posix.h | 14 +- gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-1.c | 6 - gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-2.c | 6 - gcc-4.4.3/libstdc++-v3/acinclude.m4 | 9 +- .../libstdc++-v3/config/os/bionic/ctype_base.h | 57 ++++++ .../libstdc++-v3/config/os/bionic/ctype_inline.h | 71 +++++++ .../config/os/bionic/ctype_noninline.h | 98 +++++++++ .../libstdc++-v3/config/os/bionic/os_defines.h | 36 ++++ gcc-4.4.3/libstdc++-v3/configure | 36 +++- gcc-4.4.3/libstdc++-v3/configure.host | 2 + 31 files changed, 700 insertions(+), 381 deletions(-) delete mode 100644 gcc-4.4.3/gcc/config/arm/eabi.h delete mode 100644 gcc-4.4.3/gcc/config/arm/eabi.opt create mode 100644 gcc-4.4.3/gcc/config/arm/t-linux-androideabi delete mode 100644 gcc-4.4.3/gcc/config/arm/t-mlib-armv7a delete mode 100644 gcc-4.4.3/gcc/config/arm/t-mlib-mandroid create mode 100644 gcc-4.4.3/gcc/config/linux-android.h create mode 100644 gcc-4.4.3/gcc/config/linux-android.opt delete mode 100644 gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-1.c delete mode 100644 gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-2.c create mode 100644 gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_base.h create mode 100644 gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_inline.h create mode 100644 gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_noninline.h create mode 100644 gcc-4.4.3/libstdc++-v3/config/os/bionic/os_defines.h diff --git a/gcc-4.4.3/README.google b/gcc-4.4.3/README.google index 0f3183c23..807e19c08 100644 --- a/gcc-4.4.3/README.google +++ b/gcc-4.4.3/README.google @@ -2016,8 +2016,52 @@ gcc/simplify-got.c Owner: jingyu Status: google local +config.sub +gcc/config.gcc +gcc/config/linux.h +gcc/config/linux.opt +gcc/config/alpha/linux-elf.h +gcc/config/alpha/linux.h +gcc/config/rs6000/linux.h +gcc/config/rs6000/linux64.h +gcc/config/rs6000/sysv4.h +gcc/doc/invoke.texi +gcc/testsuite/gcc.dg/glibc-uclibc-1.c +gcc/testsuite/gcc.dg/glibc-uclibc-2.c +gcc/config/arm/eabi.h +gcc/config/arm/eabi.opt +gcc/config/arm/t-linux-androideabi +gcc/config/arm/t-arm-elf +gcc/config/arm/t-mlib-armv7a +gcc/config/arm/t-mlib-mandroid +gcc/config/linux-android.h +gcc/config/linux-android.opt +gcc/gthr-posix.h +libstdc++-v3/acinclude.m4 +libstdc++-v3/config/os/bionic/ctype_base.h +libstdc++-v3/config/os/bionic/ctype_inline.h +libstdc++-v3/config/os/bionic/ctype_noninline.h +libstdc++-v3/config/os_bionic/os_defines.h +libstdc++-v3/configure +libstdc++-v3/configure.host + Backport androideabi target and bionic support from upstream. Remove local + mandroid patch (CL39911-p2) and local multilib patch (CL40150-p2). + Owner: jingyu + Status: Back port upstream patches: r159820, r159917, r159918, r159978, + r160095, r160096 + +gcc/config/linux.h + Disable sincos optimization for Android target. + Owner: jingyu + Status: keep it local + gcc/config/arm/arm.c gcc/config/arm/thumb2.md Fix a problematic pattern which crashes Android browser and camera. Owner: jingyu Status: Back port upstream patch r157942 + +gcc/config/arm/arm.h + Add .note.GNU-stack annotation to all ARM targeted codes. + Owner: jingyu + Status: keep it local diff --git a/gcc-4.4.3/config.sub b/gcc-4.4.3/config.sub index 17c91458a..55a43615d 100755 --- a/gcc-4.4.3/config.sub +++ b/gcc-4.4.3/config.sub @@ -123,8 +123,9 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -1291,7 +1292,8 @@ case $os in | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 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" ;; diff --git a/gcc-4.4.3/gcc/config/alpha/linux-elf.h b/gcc-4.4.3/gcc/config/alpha/linux-elf.h index c48fc9350..262404b23 100644 --- a/gcc-4.4.3/gcc/config/alpha/linux-elf.h +++ b/gcc-4.4.3/gcc/config/alpha/linux-elf.h @@ -29,10 +29,12 @@ along with GCC; see the file COPYING3. If not see #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -#if UCLIBC_DEFAULT -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" +#if DEFAULT_LIBC == LIBC_UCLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" +#elif DEFAULT_LIBC == LIBC_GLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" #else -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" +#error "Unsupported DEFAULT_LIBC" #endif #define LINUX_DYNAMIC_LINKER \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) diff --git a/gcc-4.4.3/gcc/config/alpha/linux.h b/gcc-4.4.3/gcc/config/alpha/linux.h index 0a32479d5..712d66d86 100644 --- a/gcc-4.4.3/gcc/config/alpha/linux.h +++ b/gcc-4.4.3/gcc/config/alpha/linux.h @@ -64,6 +64,8 @@ along with GCC; see the file COPYING3. If not see /* Define this so that all GNU/Linux targets handle the same pragmas. */ #define HANDLE_PRAGMA_PACK_PUSH_POP +#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + /* Determine whether the entire c99 runtime is present in the runtime library. */ #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) diff --git a/gcc-4.4.3/gcc/config/arm/arm.h b/gcc-4.4.3/gcc/config/arm/arm.h index 602973828..a413dd323 100644 --- a/gcc-4.4.3/gcc/config/arm/arm.h +++ b/gcc-4.4.3/gcc/config/arm/arm.h @@ -2865,9 +2865,9 @@ enum arm_builtins ARM_BUILTIN_MAX = ARM_BUILTIN_NEON_BASE /* FIXME: Wrong! */ }; -/* Do not emit .note.GNU-stack by default. */ +/* Do emit .note.GNU-stack by default. */ #ifndef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 0 +#define NEED_INDICATE_EXEC_STACK 1 #endif #endif /* ! GCC_ARM_H */ diff --git a/gcc-4.4.3/gcc/config/arm/eabi.h b/gcc-4.4.3/gcc/config/arm/eabi.h deleted file mode 100644 index e312cbc65..000000000 --- a/gcc-4.4.3/gcc/config/arm/eabi.h +++ /dev/null @@ -1,132 +0,0 @@ -/* Configuration file for ARM EABI targets. - Copyright (C) 2008 - Free Software Foundation, Inc. - Contributed by Doug Kwan (dougkwan@google.com) - - 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. - - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - -/* This file contains macro overrides for EABI targets. */ - -#undef TARGET_OS_CPP_BUILTINS -#define TARGET_OS_CPP_BUILTINS() \ - do \ - { \ - TARGET_BPABI_CPP_BUILTINS (); \ - if (TARGET_ANDROID) \ - builtin_define ("__ANDROID__"); \ - } \ - while (false) - -#undef SUBSUBTARGET_EXTRA_SPECS -#define SUBSUBTARGET_EXTRA_SPECS \ - { "link_android", ANDROID_LINK_SPEC }, \ - { "link_default", BPABI_LINK_SPEC }, \ - { "cc1_android", ANDROID_CC1_SPEC }, \ - { "cc1_default", CC1_DEFAULT_SPEC }, \ - { "cc1plus_android", ANDROID_CC1PLUS_SPEC }, \ - { "cc1plus_default", CC1PLUS_DEFAULT_SPEC }, \ - { "lib_android", ANDROID_LIB_SPEC }, \ - { "lib_default", LIB_DEFAULT_SPEC }, \ - { "startfile_android", ANDROID_STARTFILE_SPEC }, \ - { "startfile_default", UNKNOWN_ELF_STARTFILE_SPEC }, \ - { "endfile_android", ANDROID_ENDFILE_SPEC }, \ - { "endfile_default", UNKNOWN_ELF_ENDFILE_SPEC }, \ - -#undef ANDROID_LINK_SPEC -#define ANDROID_LINK_SPEC \ -"%{mbig-endian:-EB} %{mlittle-endian:-EL} " \ -"%{static:-Bstatic} %{shared:-shared} %{symbolic:-Bsymbolic} " \ -"%{!static:" \ - "%{shared: -Bsymbolic} " \ - "%{!shared:" \ - "-Bdynamic " \ - "%{rdynamic:-export-dynamic} " \ - "%{!dynamic-linker:-dynamic-linker /system/bin/linker}}} " \ -"-X" SUBTARGET_EXTRA_LINK_SPEC - -/* Override LINK_SPEC in bpabi.h. */ -#undef LINK_SPEC -#define LINK_SPEC \ -"%{mandroid: %(link_android) ;" \ -" : %(link_default)}" - -/* Android uses "-fno-exceptions -fpic -fno-short-enums -mthumb-interwork" by - default. -mthumb-interwork is implied by EABI. */ -#undef ANDROID_CC1_SPEC -#define ANDROID_CC1_SPEC \ -"%{!fexceptions:-fno-exceptions} " \ -"%{!fno-pic:%{!fno-PIC:-fpic}} " \ -"%{!fshort-enums:-fno-short-enums} " - -/* Default CC1_SPEC as in arm.h. */ -#undef CC1_DEFAULT_SPEC -#define CC1_DEFAULT_SPEC "" - -#undef CC1_SPEC -#define CC1_SPEC \ -"%{mandroid: %(cc1_android) ;" \ -" : %(cc1_default)}" - -/* Android uses -fno-rtti by default. */ -#undef ANDROID_CC1PLUS_SPEC -#define ANDROID_CC1PLUS_SPEC "%{!frtti:-fno-rtti}" - -/* Default CC1PLUS_SPEC as in gcc.c. */ -#undef CC1PLUS_DEFAULT_SPEC -#define CC1PLUS_DEFAULT_SPEC "" - -#undef CC1PLUS_SPEC -#define CC1PLUS_SPEC \ -"%{mandroid: %(cc1plus_android) ;" \ -" : %(cc1plus_default)}" - -#undef ANDROID_LIB_SPEC -#define ANDROID_LIB_SPEC "-lc %{!static:-ldl}" - -/* Default LIB_SPEC as in gcc.c. */ -#undef LIB_DEFAULT_SPEC -#define LIB_DEFAULT_SPEC \ -"%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}" - -#undef LIB_SPEC -#define LIB_SPEC \ -"%{mandroid: %(lib_android) ;" \ -" : %(lib_default)}" - -#undef ANDROID_STARTFILE_SPEC -#define ANDROID_STARTFILE_SPEC \ -"%{!shared:" \ - "%{static: crtbegin_static%O%s ;" \ - " : crtbegin_dynamic%O%s}}" - -/* Override STARTFILE_SPEC in unknown-elf.h. */ -#undef STARTFILE_SPEC -#define STARTFILE_SPEC \ -"%{mandroid: %(startfile_android) ;" \ -" : %(startfile_default)}" - -#undef ANDROID_ENDFILE_SPEC -#define ANDROID_ENDFILE_SPEC "%{!shared:crtend_android%O%s}" - -/* Override ENDFILE_SPEC in unknown-elf.h. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ -"%{mandroid: %(endfile_android) ;" \ -" : %(endfile_default)}" - -#undef NEED_INDICATE_EXEC_STACK -#define NEED_INDICATE_EXEC_STACK 1 diff --git a/gcc-4.4.3/gcc/config/arm/eabi.opt b/gcc-4.4.3/gcc/config/arm/eabi.opt deleted file mode 100644 index 0ea58bd6e..000000000 --- a/gcc-4.4.3/gcc/config/arm/eabi.opt +++ /dev/null @@ -1,23 +0,0 @@ -; EABI specific options for ARM port of the compiler. - -; Copyright (C) 2008 Free Software Foundation, Inc. -; -; 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. -; -; You should have received a copy of the GNU General Public License -; along with GCC; see the file COPYING3. If not see -; . - -mandroid -Target Report Mask(ANDROID) -Generate code for the Android operating system. diff --git a/gcc-4.4.3/gcc/config/arm/linux-eabi.h b/gcc-4.4.3/gcc/config/arm/linux-eabi.h index 4174d70db..6dd44436a 100644 --- a/gcc-4.4.3/gcc/config/arm/linux-eabi.h +++ b/gcc-4.4.3/gcc/config/arm/linux-eabi.h @@ -66,7 +66,30 @@ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to use the GNU/Linux version, not the generic BPABI version. */ #undef LINK_SPEC -#define LINK_SPEC LINUX_TARGET_LINK_SPEC +#define LINK_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ + 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 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) + +#undef STARTFILE_SPEC +#define STARTFILE_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC) + +#undef ENDFILE_SPEC +#define ENDFILE_SPEC \ + LINUX_OR_ANDROID_LD (LINUX_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-4.4.3/gcc/config/arm/t-arm-elf b/gcc-4.4.3/gcc/config/arm/t-arm-elf index b99b9ee4b..9f6068258 100644 --- a/gcc-4.4.3/gcc/config/arm/t-arm-elf +++ b/gcc-4.4.3/gcc/config/arm/t-arm-elf @@ -47,10 +47,6 @@ MULTILIB_MATCHES += $(MLMATCH_armv7a) # MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork # MULTILIB_DIRNAMES += normal interwork -MULTILIB_OPTIONS += $(MLOPT_mandroid) -MULTILIB_DIRNAMES += $(MLDIR_mandroid) -MULTILIB_EXCEPTIONS += $(MLEXCEPT_mandroid) - # MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore # MULTILIB_DIRNAMES += elf under # diff --git a/gcc-4.4.3/gcc/config/arm/t-linux-androideabi b/gcc-4.4.3/gcc/config/arm/t-linux-androideabi new file mode 100644 index 000000000..8f1307c55 --- /dev/null +++ b/gcc-4.4.3/gcc/config/arm/t-linux-androideabi @@ -0,0 +1,10 @@ +MULTILIB_OPTIONS = march=armv7-a mthumb +MULTILIB_DIRNAMES = armv7-a thumb +MULTILIB_EXCEPTIONS = +MULTILIB_MATCHES = +MULTILIB_OSDIRNAMES = + +# The "special" multilib can be used to build native applications for Android, +# as opposed to native shared libraries that are then called via JNI. +#MULTILIB_OPTIONS += tno-android-cc +#MULTILIB_DIRNAMES += special diff --git a/gcc-4.4.3/gcc/config/arm/t-mlib-armv7a b/gcc-4.4.3/gcc/config/arm/t-mlib-armv7a deleted file mode 100644 index c18407f61..000000000 --- a/gcc-4.4.3/gcc/config/arm/t-mlib-armv7a +++ /dev/null @@ -1,4 +0,0 @@ -# Config armv7-a multilib. -MLOPT_armv7a = march=armv7-a -MLDIR_armv7a = armv7a -MLMATCH_armv7a = march?armv7-a=mcpu?cortex-a8 diff --git a/gcc-4.4.3/gcc/config/arm/t-mlib-mandroid b/gcc-4.4.3/gcc/config/arm/t-mlib-mandroid deleted file mode 100644 index dd4b24344..000000000 --- a/gcc-4.4.3/gcc/config/arm/t-mlib-mandroid +++ /dev/null @@ -1,5 +0,0 @@ -# Config mandroid multilib. -# -mandroind implies -mthumb-interwork. -MLOPT_mandroid = mandroid -MLDIR_mandroid = android -MLEXCEPT_mandroid = *mthumb-interwork/*mandroid* diff --git a/gcc-4.4.3/gcc/config/linux-android.h b/gcc-4.4.3/gcc/config/linux-android.h new file mode 100644 index 000000000..a43bab5b0 --- /dev/null +++ b/gcc-4.4.3/gcc/config/linux-android.h @@ -0,0 +1,54 @@ +/* Configuration file for Linux Android targets. + Copyright (C) 2008, 2010 + Free Software Foundation, Inc. + Contributed by Doug Kwan (dougkwan@google.com) + Rewritten by CodeSourcery, Inc. + + 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. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING3. If not see + . */ + +#if ANDROID_DEFAULT +# define NOANDROID "mno-android" +#else +# define NOANDROID "!mandroid" +#endif + +#define LINUX_OR_ANDROID_CC(LINUX_SPEC, ANDROID_SPEC) \ + "%{" NOANDROID "|tno-android-cc:" LINUX_SPEC ";:" ANDROID_SPEC "}" + +#define LINUX_OR_ANDROID_LD(LINUX_SPEC, ANDROID_SPEC) \ + "%{" NOANDROID "|tno-android-ld:" LINUX_SPEC ";:" ANDROID_SPEC "}" + +#define ANDROID_LINK_SPEC \ + "%{shared: -Bsymbolic}" + +#define ANDROID_CC1_SPEC \ + "%{!mglibc:%{!muclibc:%{!mbionic: -mbionic}}} " \ + "%{!fno-pic:%{!fno-PIC:%{!fpic:%{!fPIC: -fPIC}}}}" + +#define ANDROID_CC1PLUS_SPEC \ + "%{!fexceptions:%{!fno-exceptions: -fno-exceptions}} " \ + "%{!frtti:%{!fno-rtti: -fno-rtti}}" + +#define ANDROID_LIB_SPEC \ + "%{!static: -ldl}" + +#define ANDROID_STARTFILE_SPEC \ + "%{!shared:" \ + " %{static: crtbegin_static%O%s;: crtbegin_dynamic%O%s}}" + +#define ANDROID_ENDFILE_SPEC \ + "%{!shared: crtend_android%O%s}" diff --git a/gcc-4.4.3/gcc/config/linux-android.opt b/gcc-4.4.3/gcc/config/linux-android.opt new file mode 100644 index 000000000..ad659caf0 --- /dev/null +++ b/gcc-4.4.3/gcc/config/linux-android.opt @@ -0,0 +1,23 @@ +; Android specific options. + +; Copyright (C) 2008, 2010 Free Software Foundation, Inc. +; +; 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. +; +; You should have received a copy of the GNU General Public License +; along with GCC; see the file COPYING3. If not see +; . + +mandroid +Target Report Mask(ANDROID) Var(flag_android) Init(ANDROID_DEFAULT ? OPTION_MASK_ANDROID : 0) +Generate code for the Android platform. diff --git a/gcc-4.4.3/gcc/config/linux.h b/gcc-4.4.3/gcc/config/linux.h index 581c6c34e..443db22bd 100644 --- a/gcc-4.4.3/gcc/config/linux.h +++ b/gcc-4.4.3/gcc/config/linux.h @@ -42,16 +42,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see provides part of the support for getting C++ file-scope static object constructed before entering `main'. */ -#undef STARTFILE_SPEC #if defined HAVE_LD_PIE -#define STARTFILE_SPEC \ +#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 STARTFILE_SPEC \ +#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 @@ -59,33 +60,44 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see object constructed before entering `main', followed by a normal GNU/Linux "finalizer" file, `crtn.o'. */ -#undef ENDFILE_SPEC -#define ENDFILE_SPEC \ +#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 "%{profile:-p}" +#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)" -#undef LIB_SPEC -#define LIB_SPEC \ +#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. */ +#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) +#define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) +#define OPTION_BIONIC (linux_libc == LIBC_BIONIC) #define LINUX_TARGET_OS_CPP_BUILTINS() \ do { \ - builtin_define ("__gnu_linux__"); \ + if (OPTION_GLIBC) \ + builtin_define ("__gnu_linux__"); \ builtin_define_std ("linux"); \ builtin_define_std ("unix"); \ builtin_assert ("system=linux"); \ builtin_assert ("system=unix"); \ builtin_assert ("system=posix"); \ + if (OPTION_ANDROID) \ + builtin_define ("__ANDROID__"); \ } while (0) #if defined(HAVE_LD_EH_FRAME_HDR) @@ -105,13 +117,24 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #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. */ -#if UCLIBC_DEFAULT -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" ++ uClibc or Bionic is the default C library and whether ++ -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ + "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" + +#if DEFAULT_LIBC == LIBC_GLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ + CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) +#elif DEFAULT_LIBC == LIBC_UCLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ + CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) +#elif DEFAULT_LIBC == LIBC_BIONIC +#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ + CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) #else -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" -#endif +#error "Unsupported DEFAULT_LIBC" +#endif /* DEFAULT_LIBC */ /* For most targets the following definitions suffice; GLIBC_DYNAMIC_LINKER must be defined for each target using them, or @@ -123,12 +146,19 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define UCLIBC_DYNAMIC_LINKER RUNTIME_ROOT_PREFIX "/lib/ld-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKER32 RUNTIME_ROOT_PREFIX "/lib/ld-uClibc.so.0" #define UCLIBC_DYNAMIC_LINKER64 RUNTIME_ROOT_PREFIX "/lib/ld64-uClibc.so.0" -#define LINUX_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -#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) +#define BIONIC_DYNAMIC_LINKER "/system/bin/linker" +#define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" +#define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + +#define LINUX_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ + BIONIC_DYNAMIC_LINKER) +#define LINUX_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ + BIONIC_DYNAMIC_LINKER32) +#define LINUX_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ + BIONIC_DYNAMIC_LINKER64) /* Determine whether the entire c99 runtime is present in the runtime library. */ diff --git a/gcc-4.4.3/gcc/config/linux.opt b/gcc-4.4.3/gcc/config/linux.opt index fe8c075b3..289eadece 100644 --- a/gcc-4.4.3/gcc/config/linux.opt +++ b/gcc-4.4.3/gcc/config/linux.opt @@ -19,10 +19,14 @@ ; along with GCC; see the file COPYING3. If not see ; . +mbionic +Target Report RejectNegative Var(linux_libc,LIBC_BIONIC) Init(DEFAULT_LIBC) Negative(mglibc) +Use Bionic C library + muclibc -Target RejectNegative Report Mask(UCLIBC) Var(linux_uclibc) Init(UCLIBC_DEFAULT ? OPTION_MASK_UCLIBC : 0) -Use uClibc instead of GNU libc +Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) VarExists Negative(mbionic) +Use uClibc C library mglibc -Target RejectNegative Report InverseMask(UCLIBC, GLIBC) Var(linux_uclibc) VarExists -Use GNU libc instead of uClibc +Target RejectNegative Report Var(linux_libc,LIBC_GLIBC) VarExists Negative(muclibc) +Use GNU C library diff --git a/gcc-4.4.3/gcc/config/rs6000/linux.h b/gcc-4.4.3/gcc/config/rs6000/linux.h index 4831273c5..d41c0dc56 100644 --- a/gcc-4.4.3/gcc/config/rs6000/linux.h +++ b/gcc-4.4.3/gcc/config/rs6000/linux.h @@ -30,6 +30,8 @@ /* We use glibc _mcount for profiling. */ #define NO_PROFILE_COUNTERS 1 +#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + /* glibc has float and long double forms of math functions. */ #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) diff --git a/gcc-4.4.3/gcc/config/rs6000/linux64.h b/gcc-4.4.3/gcc/config/rs6000/linux64.h index a83cc24db..3ccbe21c8 100644 --- a/gcc-4.4.3/gcc/config/rs6000/linux64.h +++ b/gcc-4.4.3/gcc/config/rs6000/linux64.h @@ -283,6 +283,8 @@ extern int dot_symbols; process. */ #define OS_MISSING_POWERPC64 !TARGET_64BIT +#define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + /* glibc has float and long double forms of math functions. */ #undef TARGET_C99_FUNCTIONS #define TARGET_C99_FUNCTIONS (OPTION_GLIBC) @@ -346,10 +348,12 @@ extern int dot_symbols; #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" #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 "}" +#if DEFAULT_LIBC == LIBC_UCLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" +#elif DEFAULT_LIBC == LIBC_GLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" #else -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" +#error "Unsupported DEFAULT_LIBC" #endif #define LINUX_DYNAMIC_LINKER32 \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) diff --git a/gcc-4.4.3/gcc/config/rs6000/sysv4.h b/gcc-4.4.3/gcc/config/rs6000/sysv4.h index a878a53ff..339d51847 100644 --- a/gcc-4.4.3/gcc/config/rs6000/sysv4.h +++ b/gcc-4.4.3/gcc/config/rs6000/sysv4.h @@ -903,10 +903,12 @@ SVR4_ASM_SPEC \ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -#if UCLIBC_DEFAULT -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:%{muclibc:%e-mglibc and -muclibc used together}" G ";:" U "}" +#if DEFAULT_LIBC == LIBC_UCLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" +#elif DEFAULT_LIBC == LIBC_GLIBC +#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" #else -#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:%{mglibc:%e-mglibc and -muclibc used together}" U ";:" G "}" +#error "Unsupported DEFAULT_LIBC" #endif #define LINUX_DYNAMIC_LINKER \ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) diff --git a/gcc-4.4.3/gcc/doc/invoke.texi b/gcc-4.4.3/gcc/doc/invoke.texi index 2f75134ae..8f7e654c8 100644 --- a/gcc-4.4.3/gcc/doc/invoke.texi +++ b/gcc-4.4.3/gcc/doc/invoke.texi @@ -461,8 +461,7 @@ Objective-C and Objective-C++ Dialects}. -mcaller-super-interworking -mcallee-super-interworking @gol -mtp=@var{name} @gol -mword-relocations @gol --mfix-cortex-m3-ldrd @gol --mandroid} +-mfix-cortex-m3-ldrd @gol} @emph{AVR Options} @gccoptlist{-mmcu=@var{mcu} -msize -mno-interrupts @gol @@ -555,7 +554,8 @@ Objective-C and Objective-C++ Dialects}. -mcpu=@var{cpu}} @emph{GNU/Linux Options} -@gccoptlist{-muclibc} +@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol +-tno-android-cc -tno-android-ld} @emph{H8/300 Options} @gccoptlist{-mrelax -mh -ms -mn -mint32 -malign-300} @@ -9601,38 +9601,6 @@ Only generate absolute relocations on word sized values (i.e. R_ARM_ABS32). This is enabled by default on targets (uClinux, SymbianOS) where the runtime loader imposes this restriction, and when @option{-fpic} or @option{-fPIC} is specified. - -@item -mandroid -@opindex mandroid -Enable Android specific compilier options. - -If this option is used, a preprocessor macro @code{__ANDROID__} is defined -and has the value 1 during compilation. The option also implies C/C++ options -@option{-fno-exceptions} @option{-fpic} @option{-mthumb-interwork} -@option{-fno-short-enums} and C++ option @option{-fno-rtti}. These implied -options can be overridden. For example RTTI in C++ code can still be enabled -with -frtti even when -mandroid is also used. - -Linking options depend on whether a static executable, a dynamic -executable or a shared library is built. When @option{-static} is given, -@option{-mandroid} implies linking flag @option{-Bstatic}, start file -@file{crtbegin_static.o} and end file @file{crtend_android.o}. - -When @option{-shared} is given, @option{-mandroid} implies the linking -flag @option{-Bsymbolic} and no start and end files. - -When none of @option{-static} and @option{-shared} is given, @option{-mandroid} -implies linking flags @option{-Bdynamic -dynamic-linker /system/bin/linker}, -start file @file{crtbegin_dynamic.o} and end file @file{crtend_android.o}. The -dynamic linker used can be overriden by another @option{-dynamic-linker} in -command line. - -The linking option @option{-ldl} is also added if @option{-static} is not -given. - -If more than one of @option{-dynamic}, @option{-static} and @option{-shared} -are given, behaviour of @option{-mandroid} is undefined. - @end table @node AVR Options @@ -10995,13 +10963,41 @@ These @samp{-m} options are defined for GNU/Linux targets: @table @gcctabopt @item -mglibc @opindex mglibc -Use the GNU C library instead of uClibc. This is the default except -on @samp{*-*-linux-*uclibc*} targets. +Use the GNU C library. This is the default except +on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. @item -muclibc @opindex muclibc -Use uClibc instead of the GNU C library. This is the default on +Use uClibc C library. This is the default on @samp{*-*-linux-*uclibc*} targets. + +@item -mbionic +@opindex mbionic +Use Bionic C library. This is the default on +@samp{*-*-linux-*android*} targets. + +@item -mandroid +@opindex mandroid +Compile code compatible with Android platform. This is the default on +@samp{*-*-linux-*android*} targets. + +When compiling, this option enables @option{-mbionic}, @option{-fPIC}, +@option{-fno-exceptions} and @option{-fno-rtti} by default. When linking, +this option makes the GCC driver pass Android-specific options to the linker. +Finally, this option causes the preprocessor macro @code{__ANDROID__} +to be defined. + +@item -tno-android-cc +@opindex tno-android-cc +Disable compilation effects of @option{-mandroid}, i.e., do not enable +@option{-mbionic}, @option{-fPIC}, @option{-fno-exceptions} and +@option{-fno-rtti} by default. + +@item -tno-android-ld +@opindex tno-android-ld +Disable linking effects of @option{-mandroid}, i.e., pass standard Linux +linking options to the linker. + @end table @node H8/300 Options diff --git a/gcc-4.4.3/gcc/gthr-posix.h b/gcc-4.4.3/gcc/gthr-posix.h index 82a3c581c..27652f96b 100644 --- a/gcc-4.4.3/gcc/gthr-posix.h +++ b/gcc-4.4.3/gcc/gthr-posix.h @@ -124,7 +124,9 @@ __gthrw(pthread_join) __gthrw(pthread_equal) __gthrw(pthread_self) __gthrw(pthread_detach) +#ifndef __BIONIC__ __gthrw(pthread_cancel) +#endif __gthrw(sched_yield) __gthrw(pthread_mutex_lock) @@ -237,8 +239,16 @@ __gthread_active_p (void) static inline int __gthread_active_p (void) { - static void *const __gthread_active_ptr - = __extension__ (void *) &__gthrw_(pthread_cancel); + static void *const __gthread_active_ptr + = __extension__ (void *) &__gthrw_( +/* Android's C library does not provide pthread_cancel, check for + `pthread_create' instead. */ +#ifndef __BIONIC__ + pthread_cancel +#else + pthread_create +#endif + ); return __gthread_active_ptr != 0; } diff --git a/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-1.c b/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-1.c deleted file mode 100644 index a3764046b..000000000 --- a/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-1.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Test -mglibc and -muclibc not allowed together. */ -/* Origin: Joseph Myers */ -/* { dg-do link { target *-*-linux* } } */ -/* { dg-options "-mglibc -muclibc" } */ - -/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ diff --git a/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-2.c b/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-2.c deleted file mode 100644 index cb5226073..000000000 --- a/gcc-4.4.3/gcc/testsuite/gcc.dg/glibc-uclibc-2.c +++ /dev/null @@ -1,6 +0,0 @@ -/* Test -mglibc and -muclibc not allowed together. */ -/* Origin: Joseph Myers */ -/* { dg-do link { target *-*-linux* } } */ -/* { dg-options "-muclibc -mglibc" } */ - -/* { dg-message "-mglibc and -muclibc used together" "" { target *-*-* } 0 } */ diff --git a/gcc-4.4.3/libstdc++-v3/acinclude.m4 b/gcc-4.4.3/libstdc++-v3/acinclude.m4 index 186916c2e..195015bd2 100644 --- a/gcc-4.4.3/libstdc++-v3/acinclude.m4 +++ b/gcc-4.4.3/libstdc++-v3/acinclude.m4 @@ -124,7 +124,7 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [ ## (Right now, this only matters for enable_wchar_t, but nothing prevents ## other macros from doing the same. This should be automated.) -pme - # Check for uClibc since Linux platforms use different configuration + # Check for C library flavor since Linux platforms use different configuration # directories depending on the C library in use. AC_EGREP_CPP([_using_uclibc], [ #include @@ -133,6 +133,13 @@ AC_DEFUN([GLIBCXX_CONFIGURE], [ #endif ], uclibc=yes, uclibc=no) + AC_EGREP_CPP([_using_bionic], [ + #include + #if __BIONIC__ + _using_bionic + #endif + ], bionic=yes, bionic=no) + # Find platform-specific directories containing configuration info. # Also possibly modify flags used elsewhere, as needed by the platform. GLIBCXX_CHECK_HOST diff --git a/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_base.h b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_base.h new file mode 100644 index 000000000..15f00636d --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_base.h @@ -0,0 +1,57 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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. + +// This library 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 +// . + +// +// ISO C++ 14882: 22.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h, for solaris2.5.1 + +// Support for Solaris 2.5.1 + +_GLIBCXX_BEGIN_NAMESPACE(std) + + /// @brief Base class for ctype. + struct ctype_base + { + // Non-standard typedefs. + typedef const int* __to_type; + + // NB: Offsets into ctype::_M_table force a particular size + // on the mask type. Because of this, we don't use an enum. + typedef char mask; + static const mask upper = _U; + static const mask lower = _L; + static const mask alpha = _U | _L; + static const mask digit = _N; + static const mask xdigit = _X | _N; + static const mask space = _S; + static const mask print = _P | _U | _L | _N | _B; + static const mask graph = _P | _U | _L | _N; + static const mask cntrl = _C; + static const mask punct = _P; + static const mask alnum = _U | _L | _N; + }; + +_GLIBCXX_END_NAMESPACE diff --git a/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_inline.h b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_inline.h new file mode 100644 index 000000000..2c88eb66d --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_inline.h @@ -0,0 +1,71 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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. + +// This library 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 +// . + +/** @file ctype_inline.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +// +// ISO C++ 14882: 22.1 Locales +// + +// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*) +// functions go in ctype.cc + +_GLIBCXX_BEGIN_NAMESPACE(std) + + bool + ctype:: + is(mask __m, char __c) const + { return _M_table[static_cast(__c)] & __m; } + + const char* + ctype:: + is(const char* __low, const char* __high, mask* __vec) const + { + while (__low < __high) + *__vec++ = _M_table[static_cast(*__low++)]; + return __high; + } + + const char* + ctype:: + scan_is(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && !this->is(__m, *__low)) + ++__low; + return __low; + } + + const char* + ctype:: + scan_not(mask __m, const char* __low, const char* __high) const + { + while (__low < __high && this->is(__m, *__low) != 0) + ++__low; + return __low; + } + +_GLIBCXX_END_NAMESPACE diff --git a/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_noninline.h b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_noninline.h new file mode 100644 index 000000000..55eecd871 --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/config/os/bionic/ctype_noninline.h @@ -0,0 +1,98 @@ +// Locale support -*- C++ -*- + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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. + +// This library 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 +// . + +/** @file ctype_noninline.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +// +// ISO C++ 14882: 22.1 Locales +// + +// Information as gleaned from /usr/include/ctype.h + + const ctype_base::mask* + ctype::classic_table() throw() + { return _ctype_ + 1; } + + ctype::ctype(__c_locale, const mask* __table, bool __del, + size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + ctype::ctype(const mask* __table, bool __del, size_t __refs) + : facet(__refs), _M_del(__table != 0 && __del), + _M_toupper(NULL), _M_tolower(NULL), + _M_table(__table ? __table : classic_table()) + { + memset(_M_widen, 0, sizeof(_M_widen)); + _M_widen_ok = 0; + memset(_M_narrow, 0, sizeof(_M_narrow)); + _M_narrow_ok = 0; + } + + char + ctype::do_toupper(char __c) const + { + int __x = __c; + return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x); + } + + const char* + ctype::do_toupper(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = this->do_toupper(*__low); + ++__low; + } + return __high; + } + + char + ctype::do_tolower(char __c) const + { + int __x = __c; + return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x); + } + + const char* + ctype::do_tolower(char* __low, const char* __high) const + { + while (__low < __high) + { + *__low = this->do_tolower(*__low); + ++__low; + } + return __high; + } + diff --git a/gcc-4.4.3/libstdc++-v3/config/os/bionic/os_defines.h b/gcc-4.4.3/libstdc++-v3/config/os/bionic/os_defines.h new file mode 100644 index 000000000..832592acd --- /dev/null +++ b/gcc-4.4.3/libstdc++-v3/config/os/bionic/os_defines.h @@ -0,0 +1,36 @@ +// Specific definitions for Bionic -*- C++ -*- + +// Copyright (C) 2010 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library 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. + +// This library 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 +// . + +/** @file os_defines.h + * This is an internal header file, included by other library headers. + * You should not attempt to use it directly. + */ + +#ifndef _GLIBCXX_OS_DEFINES +#define _GLIBCXX_OS_DEFINES 1 + +// System-specific #define, typedefs, corrections, etc, go here. This +// file will come before all others. + +#endif diff --git a/gcc-4.4.3/libstdc++-v3/configure b/gcc-4.4.3/libstdc++-v3/configure index e6a726244..6922a6c7a 100755 --- a/gcc-4.4.3/libstdc++-v3/configure +++ b/gcc-4.4.3/libstdc++-v3/configure @@ -4131,7 +4131,7 @@ fi ## (Right now, this only matters for enable_wchar_t, but nothing prevents ## other macros from doing the same. This should be automated.) -pme - # Check for uClibc since Linux platforms use different configuration + # Check for C library flavor since Linux platforms use different configuration # directories depending on the C library in use. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4155,6 +4155,24 @@ fi rm -f conftest* +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + #if __BIONIC__ + _using_bionic + #endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "_using_bionic" >/dev/null 2>&1; then : + bionic=yes +else + bionic=no +fi +rm -f conftest* + + # Find platform-specific directories containing configuration info. # Also possibly modify flags used elsewhere, as needed by the platform. @@ -5730,7 +5748,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5733 "configure"' > conftest.$ac_ext + echo '#line 5751 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -11257,7 +11275,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11260 "configure" +#line 11278 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11353,7 +11371,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11356 "configure" +#line 11374 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14607,7 +14625,7 @@ fi; # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 14610 "configure" +#line 14628 "configure" struct S { ~S(); }; void bar(); void foo() @@ -14779,7 +14797,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # unnecessary for a builtins test. cat > conftest.$ac_ext << EOF -#line 14782 "configure" +#line 14800 "configure" int main() { typedef bool atomic_type; @@ -14818,7 +14836,7 @@ echo "${ECHO_T}$enable_atomic_builtinsb" >&6 rm -f conftest* cat > conftest.$ac_ext << EOF -#line 14821 "configure" +#line 14839 "configure" int main() { typedef short atomic_type; @@ -14857,7 +14875,7 @@ echo "${ECHO_T}$enable_atomic_builtinss" >&6 rm -f conftest* cat > conftest.$ac_ext << EOF -#line 14860 "configure" +#line 14878 "configure" int main() { // NB: _Atomic_word not necessarily int. @@ -14897,7 +14915,7 @@ echo "${ECHO_T}$enable_atomic_builtinsi" >&6 rm -f conftest* cat > conftest.$ac_ext << EOF -#line 14900 "configure" +#line 14918 "configure" int main() { typedef long long atomic_type; diff --git a/gcc-4.4.3/libstdc++-v3/configure.host b/gcc-4.4.3/libstdc++-v3/configure.host index 68ba288ec..c623bde23 100644 --- a/gcc-4.4.3/libstdc++-v3/configure.host +++ b/gcc-4.4.3/libstdc++-v3/configure.host @@ -233,6 +233,8 @@ case "${host_os}" in gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) if [ "$uclibc" = "yes" ]; then os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then + os_include_dir="os/bionic" else os_include_dir="os/gnu-linux" fi -- cgit v1.2.3