comparison configure @ 15575:b8cdc8b98466

Athlon 64 optimization flags, in 32 and 64-bit mode. Patch by Corey Hickey < bugfood-ml YO fatooh POUM org >, based on Robert Swain's patch <robert POUM swain YO gmail POUM com >
author gpoirier
date Fri, 27 May 2005 11:14:22 +0000
parents 40d5e0ccce93
children 0da006f9f822
comparison
equal deleted inserted replaced
15574:0feaed9986d3 15575:b8cdc8b98466
948 948
949 x86_64|amd64) 949 x86_64|amd64)
950 _def_arch='#define ARCH_X86_64 1' 950 _def_arch='#define ARCH_X86_64 1'
951 _target_arch='TARGET_ARCH_X86_64 = yes' 951 _target_arch='TARGET_ARCH_X86_64 = yes'
952 iproc='x86_64' 952 iproc='x86_64'
953 proc='' 953
954 _march='' 954 # athlon64 cpu-type only supported in gcc >= 3.4.0
955 _mcpu='' 955 # also, gcc >= 3.4.0 doesn't support -mcpu, we have to use -mtune instead
956 _optimizing='' 956 if test "$cc_vendor" = "gnu" && test "$_cc_major" -gt 3 -o "$_cc_major" -eq 3 -a "$_cc_minor" -ge 4 ; then
957 proc=athlon64
958 cpuopt=-mtune
959 else
960 proc=athlon-xp
961 cpuopt=-mcpu
962 fi
963
964
965 echocheck "GCC & CPU optimization abilities"
966 cat > $TMPC << EOF
967 int main(void) { return 0; }
968 EOF
969 # This is a stripped-down version of the i386 fallback.
970 if test "$_runtime_cpudetection" = no ; then
971 if test "$proc" = "k8" -o "$proc" = "opteron" -o "$proc" = "athlon64" -o "$proc" = "athlon-fx" ; then
972 cc_check -march=$proc $cpuopt=$proc || proc=athlon-xp
973 fi
974 # This will fail if gcc version < 3.3, which is ok because earlier
975 # versions don't really support 64-bit on amd64.
976 # Is this a valid assumption? -Corey
977 if test "$proc" = "athlon-xp" || test "$proc" = "athlon-4" ; then
978 cc_check -march=$proc $cpuopt=$proc || proc=error
979 fi
980 if test "$proc" = "error" ; then
981 echores "Your $_cc does not even support \"athlon-xp\" for '-march' and '$cpuopt'."
982 _mcpu=""
983 _march=""
984 fi
985 else
986 _march=""
987 _mcpu=""
988 fi
989
990 _march="-march=$proc"
991 _mcpu="$cpuopt=$proc"
992 _optimizing=""
993
994 echores "$proc"
995
957 x86_exts_check 996 x86_exts_check
958 ;; 997 ;;
959 998
960 sparc) 999 sparc)
961 _def_arch='#define ARCH_SPARC 1' 1000 _def_arch='#define ARCH_SPARC 1'