aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-04-02 19:08:37 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-04-02 20:34:35 +0800
commit75b9f722caccc5276fc9c236b9ccb3f7888a86f8 (patch)
treed89ff5b069b95c36216504cc0b9e2c275fc870cd /gcc-4.8
parent8ca3ada77e50f58668ed31fac0d0b929a96ae40a (diff)
downloadtoolchain_gcc-75b9f722caccc5276fc9c236b9ccb3f7888a86f8.tar.gz
toolchain_gcc-75b9f722caccc5276fc9c236b9ccb3f7888a86f8.tar.bz2
toolchain_gcc-75b9f722caccc5276fc9c236b9ccb3f7888a86f8.zip
[4.8] Port MIPS Android support to GCC-4.8
Used to be local NDK patch at $NDK/build/tools/toolchain-patches/ gcc/0008-Port-MIPS-Android-support-to-GCC-4.6.patch See ec1a2a51fa75883e4bdf9f4f03e8fd16a261c275 Change-Id: I7526fc1f1c3304c14b8f6f6d5a0b26ddc1c7e4a0
Diffstat (limited to 'gcc-4.8')
-rw-r--r--gcc-4.8/gcc/config.gcc6
-rw-r--r--gcc-4.8/gcc/config/mips/gnu-user.h3
-rw-r--r--gcc-4.8/gcc/config/mips/linux-common.h2
-rw-r--r--gcc-4.8/gcc/config/mips/t-linux-android3
4 files changed, 12 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/config.gcc b/gcc-4.8/gcc/config.gcc
index 1a0be50f0..d202cd04b 100644
--- a/gcc-4.8/gcc/config.gcc
+++ b/gcc-4.8/gcc/config.gcc
@@ -1829,6 +1829,12 @@ mips*-*-linux*) # Linux MIPS, either endian.
mipsisa32*)
tm_defines="${tm_defines} MIPS_ISA_DEFAULT=32"
esac
+ case ${target} in
+ *android*)
+ # Default to little-endian for MIPS Android
+ # tm_defines="${tm_defines} TARGET_ENDIAN_DEFAULT=0"
+ tmake_file="$tmake_file mips/t-linux-android"
+ esac
test x$with_llsc != x || with_llsc=yes
;;
mips*-mti-elf*)
diff --git a/gcc-4.8/gcc/config/mips/gnu-user.h b/gcc-4.8/gcc/config/mips/gnu-user.h
index c26a2b5d1..8c8a65a6e 100644
--- a/gcc-4.8/gcc/config/mips/gnu-user.h
+++ b/gcc-4.8/gcc/config/mips/gnu-user.h
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
/* The GNU C++ standard library requires this. */ \
if (c_dialect_cxx ()) \
builtin_define ("_GNU_SOURCE"); \
+ ANDROID_TARGET_OS_CPP_BUILTINS(); \
} while (0)
#undef SUBTARGET_CPP_SPEC
@@ -117,7 +118,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
#endif
#define LINUX_DRIVER_SELF_SPECS \
- NO_SHARED_SPECS \
+ LINUX_OR_ANDROID_CC(NO_SHARED_SPECS, "") \
MARCH_MTUNE_NATIVE_SPECS, \
/* -mplt has no effect without -mno-shared. Simplify later \
specs handling by removing a redundant option. */ \
diff --git a/gcc-4.8/gcc/config/mips/linux-common.h b/gcc-4.8/gcc/config/mips/linux-common.h
index ca4ea0705..a8965b760 100644
--- a/gcc-4.8/gcc/config/mips/linux-common.h
+++ b/gcc-4.8/gcc/config/mips/linux-common.h
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3. If not see
#undef SUBTARGET_CC1_SPEC
#define SUBTARGET_CC1_SPEC \
LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \
- GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
+ GNU_USER_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC("-fpic"))
#undef CC1PLUS_SPEC
#define CC1PLUS_SPEC \
diff --git a/gcc-4.8/gcc/config/mips/t-linux-android b/gcc-4.8/gcc/config/mips/t-linux-android
new file mode 100644
index 000000000..298cad9d5
--- /dev/null
+++ b/gcc-4.8/gcc/config/mips/t-linux-android
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = mips32r2
+MULTILIB_DIRNAMES = mips-r2
+MULTILIB_EXCLUSIONS :=