summaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authormkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-27 12:06:58 +0000
committermkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-27 12:06:58 +0000
commitf1b7ead939b87d87b7d459a6039926246ea8dd05 (patch)
tree7ad832699f9e9bad16de80149c717b4f8e7cab5c /gcc/config.gcc
parent66fd9df95192d57d2a8720028f2b4ebd1aeff874 (diff)
downloadgcc-f1b7ead939b87d87b7d459a6039926246ea8dd05.tar.gz
Support compilation for Android platform. Reimplement -mandroid.
* config.gcc (*linux*): Include linux-android.h and linux-android.opt. (*android*): Set ANDROID_DEFAULT. (arm*-*-linux*): Include linux-android.h. (arm*-*-eabi*): Don't include previous -mandroid implementation. * config/arm/eabi.h: Remove, move Android-specific parts ... * config/linux-android.h: ... here. New file. * config/arm/eabi.opt: Rename to ... * config/linux-android.opt: ... this. (mandroid): Allow -mno-android option. Initialize based on ANDROID_DEFAULT. * config/linux.h (STARTFILE_SPEC, ENDFILE_SPEC, CC1_SPEC, LIB_SPEC): Move logic to corresponding LINUX_TARGET_* macros. (TARGET_OS_CPP_BUILTINS): Define __ANDROID__, when appropriate. * config/linux-eabi.h (LINK_SPEC, CC1_SPEC, CC1PLUS_SPEC, LIB_SPEC,) (STARTFILE_SPEC, ENDFILE_SPEC): Define to choose between Linux and Android definitions. (LINUX_TARGET_OS_CPP_BUILTINS): Define __ANDROID__ if TARGET_ANDROID. * doc/invoke.texi (-mandroid, -tno-android-cc, -tno-android-ld): Document. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159918 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc21
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index d3fcaca39ca..022997a0a4c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -534,6 +534,22 @@ case ${target} in
default_use_cxa_atexit=yes
use_gcc_tgmath=no
use_gcc_stdint=wrap
+ # 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"
@@ -717,7 +733,7 @@ arm*-*-netbsd*)
use_collect2=yes
;;
arm*-*-linux*) # ARM GNU/Linux with ELF
- tm_file="dbxelf.h elfos.h linux.h glibc-stdint.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ 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"
case $target in
arm*b-*)
tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
@@ -774,9 +790,8 @@ arm*-*-eabi* | arm*-*-symbianelf* )
tmake_file="arm/t-arm arm/t-arm-elf"
case ${target} in
arm*-*-eabi*)
- tm_file="$tm_file arm/eabi.h newlib-stdint.h"
+ tm_file="$tm_file newlib-stdint.h"
tmake_file="${tmake_file} arm/t-bpabi"
- extra_options="${extra_options} arm/eabi.opt"
use_gcc_stdint=wrap
;;
arm*-*-symbianelf*)