summaryrefslogtreecommitdiff
path: root/BUILD/check-cpu
diff options
context:
space:
mode:
authorunknown <df@pippilotta.erinye.com>2007-03-21 15:50:33 +0100
committerunknown <df@pippilotta.erinye.com>2007-03-21 15:50:33 +0100
commitfc2040cfc2e7381a824eeb69dab587f60e8c2530 (patch)
tree8b7805984ed786f30097f2b1e020e0f8194cf3f3 /BUILD/check-cpu
parent7ee021e100ef2cd951eecd00a7b03cb52e354a09 (diff)
parent983e1f5acb90ef3db021f393b7d294017f2da926 (diff)
downloadmariadb-git-fc2040cfc2e7381a824eeb69dab587f60e8c2530.tar.gz
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-26701
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build BUILD/check-cpu: Auto merged
Diffstat (limited to 'BUILD/check-cpu')
-rwxr-xr-xBUILD/check-cpu9
1 files changed, 7 insertions, 2 deletions
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index 96ed1d0e08f..8969f92bda4 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