aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2010-02-27 17:44:41 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2010-02-27 09:44:41 -0800
commitc6b9174f2eedea011622d56469d1198eb8464acf (patch)
tree7cf4abb182df775f42a56541b3d0cd53002d03b0
parentcea2d589bd22a51d35f5c138fd847a58f9e15e9a (diff)
downloadgcc-c6b9174f2eedea011622d56469d1198eb8464acf.zip
gcc-c6b9174f2eedea011622d56469d1198eb8464acf.tar.gz
gcc-c6b9174f2eedea011622d56469d1198eb8464acf.tar.bz2
Set the default 32bit/64bit archs if needed.
2010-02-27 H.J. Lu <hongjiu.lu@intel.com> * config.gcc: Set the default 32bit/64bit archs if 64bit ISA is required and i[34567]86-*-* targets don't support 64bit ISA. From-SVN: r157110
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config.gcc25
2 files changed, 29 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d506a49..f6cdb86 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * config.gcc: Set the default 32bit/64bit archs if 64bit ISA is
+ required and i[34567]86-*-* targets don't support 64bit ISA.
+
2010-02-26 Eric Botcazou <ebotcazou@adacore.com>
PR ada/43096
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a189400..0d46878 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -199,6 +199,7 @@ gnu_ld="$gnu_ld_flag"
default_use_cxa_atexit=no
target_gtfiles=
need_64bit_hwint=
+need_64bit_isa=
# Don't carry these over build->host->target. Please.
xm_file=
@@ -1083,6 +1084,7 @@ hppa[12]*-*-hpux11*)
;;
i[34567]86-*-darwin*)
need_64bit_hwint=yes
+ need_64bit_isa=yes
# This is so that '.../configure && make' doesn't fail due to
# config.guess deciding that the configuration is i386-*-darwin* and
@@ -1148,6 +1150,7 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
tm_defines="${tm_defines} TARGET_BI_ARCH=1"
tmake_file="${tmake_file} i386/t-linux64"
need_64bit_hwint=yes
+ need_64bit_isa=yes
case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
;;
@@ -1266,6 +1269,7 @@ i[34567]86-*-solaris2*)
# depends on a runtime test and is thus performed in
# libgcc/configure.ac instead.
need_64bit_hwint=yes
+ need_64bit_isa=yes
use_gcc_stdint=wrap
case X"${with_cpu}" in
Xgeneric|Xatom|Xcore2|Xnocona|Xx86-64|Xamdfam10|Xbarcelona|Xk8|Xopteron|Xathlon64|Xathlon-fx|Xathlon64-sse3|Xk8-sse3|Xopteron-sse3)
@@ -1335,6 +1339,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
case ${target} in
x86_64-*-* | *-w64-*)
need_64bit_hwint=yes
+ need_64bit_isa=yes
;;
*)
;;
@@ -2626,19 +2631,23 @@ esac
arch=
cpu=
arch_without_sse2=no
+arch_without_64bit=no
case ${target} in
i386-*-*)
arch=i386
cpu=i386
arch_without_sse2=yes
+ arch_without_64bit=yes
;;
i486-*-*)
arch=i486
cpu=i486
arch_without_sse2=yes
+ arch_without_64bit=yes
;;
i586-*-*)
arch_without_sse2=yes
+ arch_without_64bit=yes
case ${target_noncanonical} in
k6_2-*)
arch=k6-2
@@ -2680,6 +2689,7 @@ case ${target} in
arch=athlon-4
cpu=athlon-4
arch_without_sse2=yes
+ arch_without_64bit=yes
;;
athlon_tbird-*|athlon-*)
arch=athlon
@@ -2734,6 +2744,7 @@ case ${target} in
arch=pentiumpro
cpu=generic
arch_without_sse2=yes
+ arch_without_64bit=yes
;;
esac
;;
@@ -2878,9 +2889,21 @@ if test x$with_arch = x ; then
with_arch_32=$arch
fi
if test x$with_arch_64 = x; then
- with_arch_64=$arch
+ if test $arch_without_64bit = yes; then
+ # Set the default 64bit arch to x86-64 if the default arch
+ # doesn't support 64bit.
+ with_arch_64=x86-64
+ else
+ with_arch_64=$arch
+ fi
fi
with_arch=
+ elif test $arch_without_64bit$need_64bit_isa = yesyes; then
+ # Set the default 64bit arch to x86-64 if the default arch
+ # doesn't support 64bit and we need 64bit ISA.
+ with_arch_32=$arch
+ with_arch_64=x86-64
+ with_arch=
fi
;;
esac