From b9e27e705aa44eb7fa64bafce2155c55c45c7447 Mon Sep 17 00:00:00 2001 From: davidxl Date: Wed, 2 Jul 2014 04:43:51 +0000 Subject: [PATCH] Fix build error introduced in Android patch porting git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/google@212219 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc-4_9/gcc/config.gcc | 10 ++++++++-- gcc-4_9/gcc/config/aarch64/aarch64-linux.h | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gcc-4_9/gcc/config.gcc b/gcc-4_9/gcc/config.gcc index 8d322fbe0c2..b53c6f5b93b 100644 --- a/gcc-4_9/gcc/config.gcc +++ b/gcc-4_9/gcc/config.gcc @@ -903,9 +903,15 @@ aarch64*-*-elf) TM_MULTILIB_CONFIG=`echo $TM_MULTILIB_CONFIG | sed 's/^,//'` ;; aarch64*-*-linux*) - tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h" + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h" + case $target in + aarch64*-*-linux-android*) + tm_file="${tm_file} linux-android.h" + extra_options="${extra_options} linux-android.opt" + ;; + esac + tm_file="${tm_file} aarch64/aarch64-elf.h aarch64/aarch64-linux.h" - extra_options="${extra_options} linux-android.opt" tmake_file="${tmake_file} aarch64/t-aarch64 aarch64/t-aarch64-linux" case $target in aarch64_be-*) diff --git a/gcc-4_9/gcc/config/aarch64/aarch64-linux.h b/gcc-4_9/gcc/config/aarch64/aarch64-linux.h index 852929edc44..e968e07f38f 100644 --- a/gcc-4_9/gcc/config/aarch64/aarch64-linux.h +++ b/gcc-4_9/gcc/config/aarch64/aarch64-linux.h @@ -28,6 +28,7 @@ #define CPP_SPEC "%{pthread:-D_REENTRANT}" + #define LINUX_TARGET_LINK_SPEC "%{h*} \ %{static:-Bstatic} \ %{shared:-shared} \ @@ -38,6 +39,11 @@ %{mbig-endian:-EB} %{mlittle-endian:-EL} \ -maarch64linux%{mbig-endian:b}" +/* Android specific */ +#ifndef LINUX_OR_ANDROID_CC +#define ANDROID_TARGET_OS_CPP_BUILTINS() +#endif + #define TARGET_OS_CPP_BUILTINS() \ do \ { \ @@ -46,6 +52,12 @@ } \ while (0) +/* Android specific macros. Should probably be + moved into android specific header file aarch64-linux-android.h + and include it in tm.h (see gcc/config.gcc). */ + +#ifdef LINUX_OR_ANDROID_CC + #undef LINK_SPEC #define LINK_SPEC \ LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC, \ @@ -72,4 +84,6 @@ #define ENDFILE_SPEC \ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC) +#endif + #endif /* GCC_AARCH64_LINUX_H */ -- 2.11.4.GIT