aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8
diff options
context:
space:
mode:
authorPavel Chupin <pavel.v.chupin@intel.com>2014-07-21 22:31:19 +0400
committerPavel Chupin <pavel.v.chupin@intel.com>2014-07-22 00:38:23 +0400
commit63d8d5d58b9f5b3408dad136d4abc89113818649 (patch)
tree3011cfb45ff9ed5f2e21828b17d66a46ee12b374 /gcc-4.8
parentc231900e5dcc14d8296bd9f62b45997a49d4d5e7 (diff)
downloadtoolchain_gcc-63d8d5d58b9f5b3408dad136d4abc89113818649.tar.gz
toolchain_gcc-63d8d5d58b9f5b3408dad136d4abc89113818649.tar.bz2
toolchain_gcc-63d8d5d58b9f5b3408dad136d4abc89113818649.zip
[4.8, 4.9] Fix broken ABI defaults for 32-bit x86 compiler
For multilib compiler x86_64-* we need to pass compiler ABI flags based on flags -m32 or -m64, and no flags means -m64. But for 32-bit target compiler i686-* we should pass 32-bit ABI flags only. This change fixes the last part. Change-Id: I00adf4b633952f7a5fde5dc18ca4926a349472cd Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
Diffstat (limited to 'gcc-4.8')
-rw-r--r--gcc-4.8/gcc/config/i386/gnu-user.h4
-rw-r--r--gcc-4.8/gcc/config/i386/gnu-user64.h5
-rw-r--r--gcc-4.8/gcc/config/i386/linux-common.h5
3 files changed, 9 insertions, 5 deletions
diff --git a/gcc-4.8/gcc/config/i386/gnu-user.h b/gcc-4.8/gcc/config/i386/gnu-user.h
index 2f0a4d74a..d4fcd4c3c 100644
--- a/gcc-4.8/gcc/config/i386/gnu-user.h
+++ b/gcc-4.8/gcc/config/i386/gnu-user.h
@@ -65,6 +65,10 @@ along with GCC; see the file COPYING3. If not see
When the -shared link option is used a final link is not being
done. */
+#undef ANDROID_TARGET_CC1_SPEC
+#define ANDROID_TARGET_CC1_SPEC \
+ " -mstackrealign -mssse3 -fno-short-enums " \
+
#undef ASM_SPEC
#define ASM_SPEC \
"--32 %{!mno-sse2avx:%{mavx:-msse2avx}} %{msse2avx:%{!mavx:-msse2avx}} " \
diff --git a/gcc-4.8/gcc/config/i386/gnu-user64.h b/gcc-4.8/gcc/config/i386/gnu-user64.h
index 952bb5b47..ad636a171 100644
--- a/gcc-4.8/gcc/config/i386/gnu-user64.h
+++ b/gcc-4.8/gcc/config/i386/gnu-user64.h
@@ -46,6 +46,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define SPEC_X32 "mx32"
#endif
+#undef ANDROID_TARGET_CC1_SPEC
+#define ANDROID_TARGET_CC1_SPEC \
+ "%{m32:-mstackrealign -mssse3 -fno-short-enums}" \
+ "%{!m32:-msse4.2 -mpopcnt}"
+
#undef ASM_SPEC
#define ASM_SPEC "%{" SPEC_32 ":--32} \
%{" SPEC_64 ":--64} \
diff --git a/gcc-4.8/gcc/config/i386/linux-common.h b/gcc-4.8/gcc/config/i386/linux-common.h
index fd10aefdf..ddbc33409 100644
--- a/gcc-4.8/gcc/config/i386/linux-common.h
+++ b/gcc-4.8/gcc/config/i386/linux-common.h
@@ -27,11 +27,6 @@ along with GCC; see the file COPYING3. If not see
} \
while (0)
-#undef ANDROID_TARGET_CC1_SPEC
-#define ANDROID_TARGET_CC1_SPEC \
- "%{m32:-mstackrealign -mssse3 -fno-short-enums}" \
- "%{!m32:-msse4.2 -mpopcnt}"
-
#undef CC1_SPEC
#define CC1_SPEC \
LINUX_OR_ANDROID_CC (GNU_USER_TARGET_CC1_SPEC, \