aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc-4.9/gcc/config.gcc3
-rw-r--r--gcc-4.9/gcc/config/aarch64/aarch64-linux.h30
-rw-r--r--gcc-4.9/libatomic/configure.tgt5
-rw-r--r--gcc-4.9/libgcc/config.host3
4 files changed, 37 insertions, 4 deletions
diff --git a/gcc-4.9/gcc/config.gcc b/gcc-4.9/gcc/config.gcc
index 3c55c88af..7e51940f1 100644
--- a/gcc-4.9/gcc/config.gcc
+++ b/gcc-4.9/gcc/config.gcc
@@ -903,8 +903,9 @@ 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 glibc-stdint.h"
+ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h"
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 a8f077156..4eacdb239 100644
--- a/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc-4.9/gcc/config/aarch64/aarch64-linux.h
@@ -22,6 +22,7 @@
#define GCC_AARCH64_LINUX_H
#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1"
+#define BIONIC_DYNAMIC_LINKER "/system/bin/linker64"
#define CPP_SPEC "%{pthread:-D_REENTRANT}"
@@ -35,13 +36,38 @@
%{mbig-endian:-EB} %{mlittle-endian:-EL} \
-maarch64linux%{mbig-endian:b}"
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
-
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
GNU_USER_TARGET_OS_CPP_BUILTINS(); \
+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
} \
while (0)
+#undef 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 (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 (GNU_USER_TARGET_LIB_SPEC, \
+ GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC " " ANDROID_LIB_SPEC)
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_STARTFILE_SPEC, ANDROID_STARTFILE_SPEC)
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+ LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
+
#endif /* GCC_AARCH64_LINUX_H */
diff --git a/gcc-4.9/libatomic/configure.tgt b/gcc-4.9/libatomic/configure.tgt
index a3757efbb..3904e6602 100644
--- a/gcc-4.9/libatomic/configure.tgt
+++ b/gcc-4.9/libatomic/configure.tgt
@@ -95,6 +95,11 @@ fi
# Other system configury
case "${target}" in
+ aarch64*)
+ # ANDROID - This is currently not supported in AArch64.
+ UNSUPPORTED=1
+ ;;
+
arm*-*-linux*)
# OS support for atomic primitives.
config_path="${config_path} linux/arm posix"
diff --git a/gcc-4.9/libgcc/config.host b/gcc-4.9/libgcc/config.host
index f8f74cc40..91d496277 100644
--- a/gcc-4.9/libgcc/config.host
+++ b/gcc-4.9/libgcc/config.host
@@ -320,7 +320,8 @@ aarch64*-*-elf)
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
;;
aarch64*-*-linux*)
- md_unwind_header=aarch64/linux-unwind.h
+ # ANDROID - uncomment when sysroot contains sys/ucontext.h
+ # md_unwind_header=aarch64/linux-unwind.h
tmake_file="${tmake_file} ${cpu_type}/t-aarch64"
tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp"
;;