aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/gcc/config/i386/gnu-user64.h
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-04-22 03:38:00 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-04-22 03:38:00 +0000
commit4d986177b7a40bd4d1b3b49a33adc90da13cc017 (patch)
tree29e02288e6dec8da846c4ad4c1d2d32406ca9abd /gcc-4.7/gcc/config/i386/gnu-user64.h
parented7057a1ece24733fe30423cd94131deb8ccb2ca (diff)
parent9e1f9b3eacb51a67e675cd1195c472215fb16373 (diff)
downloadtoolchain_gcc-4d986177b7a40bd4d1b3b49a33adc90da13cc017.tar.gz
toolchain_gcc-4d986177b7a40bd4d1b3b49a33adc90da13cc017.tar.bz2
toolchain_gcc-4d986177b7a40bd4d1b3b49a33adc90da13cc017.zip
Merge "[4.7] x32: Backport x32 support into 4.7"
Diffstat (limited to 'gcc-4.7/gcc/config/i386/gnu-user64.h')
-rw-r--r--gcc-4.7/gcc/config/i386/gnu-user64.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc-4.7/gcc/config/i386/gnu-user64.h b/gcc-4.7/gcc/config/i386/gnu-user64.h
index ed06b6afe..c392fd738 100644
--- a/gcc-4.7/gcc/config/i386/gnu-user64.h
+++ b/gcc-4.7/gcc/config/i386/gnu-user64.h
@@ -40,7 +40,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#undef CC1_SPEC
#define CC1_SPEC \
LINUX_OR_ANDROID_CC (LINUX_TARGET_CC1_SPEC, \
- LINUX_TARGET_CC1_SPEC " " ANDROID_CC1_SPEC)
+ LINUX_TARGET_CC1_SPEC \
+ " -mstackrealign -mssse3" \
+ " -fno-short-enums" \
+ " " \
+ ANDROID_CC1_SPEC("-fPIC"))
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. In the 64bit compilation we will turn this flag off in
@@ -63,8 +67,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if TARGET_64BIT_DEFAULT
#define SPEC_32 "m32"
+#if TARGET_BI_ARCH == 2
+#define SPEC_64 "m64"
+#define SPEC_X32 "m32|m64:;"
+#else
#define SPEC_64 "m32|mx32:;"
#define SPEC_X32 "mx32"
+#endif
#else
#define SPEC_32 "m64|mx32:;"
#define SPEC_64 "m64"
@@ -119,7 +128,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
ANDROID_ENDFILE_SPEC)
#if TARGET_64BIT_DEFAULT
+#if TARGET_BI_ARCH == 2
+#define MULTILIB_DEFAULTS { "mx32" }
+#else
#define MULTILIB_DEFAULTS { "m64" }
+#endif
#else
#define MULTILIB_DEFAULTS { "m32" }
#endif
@@ -150,3 +163,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#define TARGET_THREAD_SPLIT_STACK_OFFSET \
(TARGET_64BIT ? (TARGET_X32 ? 0x40 : 0x70) : 0x30)
#endif
+
+#undef WCHAR_TYPE
+#define WCHAR_TYPE (TARGET_LP64 ? "int" : "long int")