diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2012-05-24 17:38:46 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2012-05-24 17:38:46 +0800 |
commit | 572f136c35fd954536c8a52bd27643c993a005fb (patch) | |
tree | d11892f832eb28de0f69658af9c091334da3c0e3 /build/tools/toolchain-patches/gcc | |
parent | ba530708ee594f8dc05e24f7d689f052b11512fb (diff) | |
download | ndk-572f136c35fd954536c8a52bd27643c993a005fb.tar.gz |
Remove -mno-shared as default in MIPS toolchain
-fPIC (or -fpic if supported) is default for Android toolchain. Without
explicitly specifying one of -mshared, -fpic, -fPIC, -fpie, or -fPIE,
MIPS compiler adds -mno-shared which turns off PIC. Fixed it not to
add -mno-shared as default.
Change-Id: Id499e332fc5e9a33a221ee947d124468f405f16a
Diffstat (limited to 'build/tools/toolchain-patches/gcc')
2 files changed, 18 insertions, 0 deletions
diff --git a/build/tools/toolchain-patches/gcc/0007-Add-MIPS-Android-support-and-default-to-Little-Endia.patch b/build/tools/toolchain-patches/gcc/0007-Add-MIPS-Android-support-and-default-to-Little-Endia.patch index 3d2ebe337..0a3975c29 100644 --- a/build/tools/toolchain-patches/gcc/0007-Add-MIPS-Android-support-and-default-to-Little-Endia.patch +++ b/build/tools/toolchain-patches/gcc/0007-Add-MIPS-Android-support-and-default-to-Little-Endia.patch @@ -74,6 +74,15 @@ index 0512ef7..9e3ec05 100644 %{pthread:-lpthread} \ %{shared:-lc} \ %{!shared: \ +@@ -135,7 +135,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. */ \ @@ -147,3 +148,30 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); #define DRIVER_SELF_SPECS \ BASE_DRIVER_SELF_SPECS, \ diff --git a/build/tools/toolchain-patches/gcc/0008-Port-MIPS-Android-support-to-GCC-4.6.patch b/build/tools/toolchain-patches/gcc/0008-Port-MIPS-Android-support-to-GCC-4.6.patch index f45c92396..f7c3df4bd 100644 --- a/build/tools/toolchain-patches/gcc/0008-Port-MIPS-Android-support-to-GCC-4.6.patch +++ b/build/tools/toolchain-patches/gcc/0008-Port-MIPS-Android-support-to-GCC-4.6.patch @@ -74,6 +74,15 @@ index a78f6bc..9ee5808 100644 %{pthread:-lpthread} \ %{shared:-lc} \ %{!shared: \ +@@ -131,7 +131,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. */ \ @@ -145,7 +146,36 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); LINUX_DRIVER_SELF_SPECS |