aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2014-04-14 16:41:52 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 15:32:56 -0700
commit12bd1931fd8a295e88a39aebc4f6c0ef98add4f5 (patch)
treeead63640d07be3b3072856c087069e885213158a /gcc-4.9
parent729619cb26b27db827d5dca9f5d4e0ecf5c1e23d (diff)
downloadtoolchain_gcc-12bd1931fd8a295e88a39aebc4f6c0ef98add4f5.tar.gz
toolchain_gcc-12bd1931fd8a295e88a39aebc4f6c0ef98add4f5.tar.bz2
toolchain_gcc-12bd1931fd8a295e88a39aebc4f6c0ef98add4f5.zip
[4.9] Port MIPS Android support to GCC-4.9
See 75b9f722caccc5276fc9c236b9ccb3f7888a86f8 Change-Id: Ia941c59bb94ab943c6ccc188b050daf1894d31d2
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/config.gcc6
-rw-r--r--gcc-4.9/gcc/config/mips/gnu-user.h3
-rw-r--r--gcc-4.9/gcc/config/mips/linux-common.h2
-rw-r--r--gcc-4.9/gcc/config/mips/t-linux-android3
4 files changed, 12 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/config.gcc b/gcc-4.9/gcc/config.gcc
index 7e51940f1..af05ada39 100644
--- a/gcc-4.9/gcc/config.gcc
+++ b/gcc-4.9/gcc/config.gcc
@@ -1994,6 +1994,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
;;
mips*-mti-elf*)
tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h"
diff --git a/gcc-4.9/gcc/config/mips/gnu-user.h b/gcc-4.9/gcc/config/mips/gnu-user.h
index 1a5b0deb9..bbe78886f 100644
--- a/gcc-4.9/gcc/config/mips/gnu-user.h
+++ b/gcc-4.9/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.9/gcc/config/mips/linux-common.h b/gcc-4.9/gcc/config/mips/linux-common.h
index e1e977eb9..c0ecf9d0c 100644
--- a/gcc-4.9/gcc/config/mips/linux-common.h
+++ b/gcc-4.9/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.9/gcc/config/mips/t-linux-android b/gcc-4.9/gcc/config/mips/t-linux-android
new file mode 100644
index 000000000..298cad9d5
--- /dev/null
+++ b/gcc-4.9/gcc/config/mips/t-linux-android
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = mips32r2
+MULTILIB_DIRNAMES = mips-r2
+MULTILIB_EXCLUSIONS :=