summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorunknown <istruewing@chilla.local>2007-01-29 17:20:18 +0100
committerunknown <istruewing@chilla.local>2007-01-29 17:20:18 +0100
commitd308799383bdbcaad568c9844b34708462dd74e7 (patch)
tree9ecca7943a964140be08bdfb8a54f9b76b89e592 /BUILD
parent9403c7ca67535aa2a7610c4887b6e9276f5cb333 (diff)
parentfddf3c397913f3254bd2adf0d1d7ad4cde586355 (diff)
downloadmariadb-git-d308799383bdbcaad568c9844b34708462dd74e7.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into chilla.local:/home/mydev/mysql-4.1-axmrg mysql-test/r/symlink.result: Auto merged mysql-test/t/symlink.test: Auto merged mysql-test/r/myisam.result: Manual merged mysql-test/t/myisam.test: Manual merged
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/SETUP.sh.rej19
-rwxr-xr-xBUILD/check-cpu35
2 files changed, 48 insertions, 6 deletions
diff --git a/BUILD/SETUP.sh.rej b/BUILD/SETUP.sh.rej
new file mode 100644
index 00000000000..ccbcaa4404f
--- /dev/null
+++ b/BUILD/SETUP.sh.rej
@@ -0,0 +1,19 @@
+***************
+*** 39,46 ****
+ c_warnings="$global_warnings -Wunused"
+ cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
+
+! alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
+! pentium_cflags="-mcpu=pentiumpro"
+ sparc_cflags=""
+
+ # be as fast as we can be without losing our ability to backtrace
+--- 39,46 ----
+ c_warnings="$global_warnings -Wunused"
+ cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
+
+! #alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
+! #pentium_cflags="-mcpu=pentiumpro"
+ sparc_cflags=""
+
+ # be as fast as we can be without losing our ability to backtrace
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index e207d12d972..2854ec721c6 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -5,9 +5,13 @@
#
check_cpu () {
- if test -r /proc/cpuinfo ; then
+ CPUINFO=/proc/cpuinfo
+ if test -n "$TEST_CPUINFO" ; then
+ CPUINFO=$TEST_CPUINFO
+ fi
+ if test -r "$CPUINFO" -a "$CPUINFO" != " " ; then
# on Linux (and others?) we can get detailed CPU information out of /proc
- cpuinfo="cat /proc/cpuinfo"
+ cpuinfo="cat $CPUINFO"
# detect CPU family
cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
@@ -28,11 +32,12 @@ check_cpu () {
fi
# parse CPU flags
- for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do
+ for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do
eval cpu_flag_$flag=yes
done
else
# Fallback when there is no /proc/cpuinfo
+ CPUINFO=" "
case "`uname -s`" in
FreeBSD|OpenBSD)
cpu_family=`uname -m`;
@@ -84,6 +89,18 @@ check_cpu () {
*Pentium*M*pro*)
cpu_arg="pentium-m";
;;
+ *Celeron\(R\)*\ M*)
+ cpu_arg="pentium-m";
+ ;;
+ *Celeron*Coppermine*)
+ cpu_arg="pentium3"
+ ;;
+ *Celeron\(R\)*)
+ cpu_arg="pentium4"
+ ;;
+ *Celeron*)
+ cpu_arg="pentium2";
+ ;;
*Athlon*64*)
cpu_arg="athlon64";
;;
@@ -113,7 +130,14 @@ check_cpu () {
esac
- if test -z "$cpu_arg"; then
+ if test -z "$cpu_arg" ; then
+ if test "$CPUINFO" != " " ; then
+ # fallback to uname if necessary
+ TEST_CPUINFO=" "
+ check_cpu_cflags=""
+ check_cpu
+ return
+ fi
echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using." >&2
check_cpu_cflags=""
return
@@ -167,8 +191,7 @@ check_cpu () {
touch __test.c
while [ "$cpu_arg" ] ; do
- # FIXME: echo -n isn't portable - see contortions autoconf goes through
- echo -n testing $cpu_arg "... " >&2
+ printf "testing $cpu_arg ... " >&2
# compile check
check_cpu_cflags=`eval echo $check_cpu_args`