diff options
author | unknown <df@pippilotta.erinye.com> | 2007-03-21 15:53:11 +0100 |
---|---|---|
committer | unknown <df@pippilotta.erinye.com> | 2007-03-21 15:53:11 +0100 |
commit | 3eb75c15ea7cfef58bd6643e16af8036c297923b (patch) | |
tree | 0f30b98b82b7c80fc112b897f31ff3c7f63e40d9 /BUILD/check-cpu | |
parent | 7dcf587c9f3ba3d6b2c2a4a9e701b2039c73c0c4 (diff) | |
parent | 578e45917ded2b827f43acde7f9310ecc5ab2e6d (diff) | |
download | mariadb-git-3eb75c15ea7cfef58bd6643e16af8036c297923b.tar.gz |
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work-26701
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
BUILD/check-cpu:
Auto merged
Diffstat (limited to 'BUILD/check-cpu')
-rwxr-xr-x | BUILD/check-cpu | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/BUILD/check-cpu b/BUILD/check-cpu index 4cb43b141d2..d3d5b3734cc 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -164,13 +164,18 @@ check_cpu () { cc_ver=`$cc --version | sed 1q` cc_verno=`echo $cc_ver | sed -e 's/^.*gcc/gcc/g; s/[^0-9. ]//g; s/^ *//g; s/ .*//g'` + set -- `echo $cc_verno | tr '.' ' '` + cc_major=$1 + cc_minor=$2 + cc_patch=$3 + cc_comp=`expr $cc_major '*' 100 '+' $cc_minor` case "$cc_ver--$cc_verno" in *GCC*) # different gcc backends (and versions) have different CPU flags case `gcc -dumpmachine` in i?86-*) - if test "$cc_verno" -lt "3.4" + if test "$cc_comp" -lt 304 then check_cpu_args='-mcpu=$cpu_arg' else @@ -181,7 +186,7 @@ check_cpu () { check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg' ;; x86_64-*) - if test "$cc_verno" -lt "3.4" + if test "$cc_comp" -lt 304 then check_cpu_args='-mcpu=$cpu_arg' else |