2010-02-26 H.J. Lu * config.gcc: Don't set the default arch if 64bit ISA is required and i[34567]86-*-* targets don't support 64bit ISA. diff --git a/gcc/config.gcc b/gcc/config.gcc index a189400..610ff2a 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 @@ -2848,21 +2858,28 @@ if test x$with_arch = x ; then case ${target} in i[34567]86-*-darwin*) # SSE math is enabled for Darwin, which sets the default ISA to - # SSE2. The minimum ISA supported Darwin is SSE3, which is the - # same as Prescott. - if test $arch_without_sse2 = no; then + # SSE2. The minimum ISA supported Darwin is SSE3 and Darwin also + # needs 64bit ISA, which is the same as Nocona. + if test $arch_without_sse2$arch_without_64bit = nono; then with_arch=$arch else - with_arch=prescott + with_arch=nocona fi ;; i[34567]86-*-*) # --with-fpmath sets the default ISA to SSE2, which is the same - # ISA supported by Pentium 4. - if test x$with_fpmath = x || test $arch_without_sse2 = no; then - with_arch=$arch + # ISA supported by Pentium 4. If 64bit ISA is required, we don't + # set with_arch if arch_without_64bit is yes. + if test $need_64bit_isa = yes; then + if test $arch_without_64bit != yes; then + with_arch=$arch + fi else - with_arch=pentium4 + if test x$with_fpmath = x || test $arch_without_sse2 = no; then + with_arch=$arch + else + with_arch=pentium4 + fi fi ;; x86_64-*-*)