aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.7/gcc/config.gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.7/gcc/config.gcc')
-rw-r--r--gcc-4.7/gcc/config.gcc34
1 files changed, 31 insertions, 3 deletions
diff --git a/gcc-4.7/gcc/config.gcc b/gcc-4.7/gcc/config.gcc
index 44befba79..c5aae017d 100644
--- a/gcc-4.7/gcc/config.gcc
+++ b/gcc-4.7/gcc/config.gcc
@@ -494,6 +494,10 @@ fi
case ${target} in
i[34567]86-*-*)
+ if test "x$with_abi" != x; then
+ echo "This target does not support --with-abi."
+ exit 1
+ fi
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
@@ -503,7 +507,24 @@ i[34567]86-*-*)
tm_file="vxworks-dummy.h ${tm_file}"
;;
x86_64-*-*)
- tm_file="i386/biarch64.h ${tm_file}"
+ case ${with_abi} in
+ "")
+ if test "x$with_multilib_list" = xmx32; then
+ tm_file="i386/biarchx32.h ${tm_file}"
+ else
+ tm_file="i386/biarch64.h ${tm_file}"
+ fi
+ ;;
+ 64 | m64)
+ tm_file="i386/biarch64.h ${tm_file}"
+ ;;
+ x32 | mx32)
+ tm_file="i386/biarchx32.h ${tm_file}"
+ ;;
+ *)
+ echo "Unknown ABI used in --with-abi=$with_abi"
+ exit 1
+ esac
if test "x$enable_cld" = xyes; then
tm_defines="${tm_defines} USE_IX86_CLD=1"
fi
@@ -1318,7 +1339,14 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
tmake_file="${tmake_file} i386/t-linux64"
x86_multilibs="${with_multilib_list}"
if test "$x86_multilibs" = "default"; then
- x86_multilibs="m64,m32"
+ case ${with_abi} in
+ x32 | mx32)
+ x86_multilibs="mx32"
+ ;;
+ *)
+ x86_multilibs="m64,m32"
+ ;;
+ esac
fi
x86_multilibs=`echo $x86_multilibs | sed -e 's/,/ /g'`
for x86_multilib in ${x86_multilibs}; do
@@ -3233,7 +3261,7 @@ case "${target}" in
;;
i[34567]86-*-* | x86_64-*-*)
- supported_defaults="arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
+ supported_defaults="abi arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64"
for which in arch arch_32 arch_64 cpu cpu_32 cpu_64 tune tune_32 tune_64; do
eval "val=\$with_$which"
case ${val} in