Commit 290b8411 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/mnt/archive/svoj/mysql/mysql-5.1

into mysql.com:/home/svoj/devel/mysql/WL2535-mysql-5.1

parents 289d3bc2 e4c09a77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@

EXTRA_DIST =		FINISH.sh \
			SETUP.sh \
			check-cpu \
			compile-alpha \
			compile-alpha-ccc \
			compile-alpha-cxx \
+131 −40
Original line number Diff line number Diff line
@@ -6,109 +6,200 @@
#

if test -r /proc/cpuinfo ; then
  # on Linux (and others?) we can get detailed CPU information out of /proc
  cpuinfo="cat /proc/cpuinfo"

  # detect CPU family
  cpu_family=`$cpuinfo | grep 'family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  if test -z "$cpu_family" ; then
    cpu_family=`$cpuinfo | grep 'cpu' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  fi

  # detect CPU vendor and model
  cpu_vendor=`$cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2 | head -1`
  model_name=`$cpuinfo | grep 'model name' | cut -d ':' -f 2 | head -1`
  if test -z "$model_name" ; then
    model_name=`$cpuinfo | grep 'cpu model' | cut -d ':' -f 2 | head -1`
  fi

  # fallback: get CPU model from uname output
  if test -z "$model_name" ; then
    model_name=`uname -m`
  fi

  # parse CPU flags
  for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do 
	eval cpu_flag_$flag=yes
  done
else
  # Fallback when there is no /proc/cpuinfo
  case "`uname -s`" in
    FreeBSD)
    FreeBSD|OpenBSD)
      cpu_family=`uname -m`;
      model_name=`sysctl -b hw.model`
      model_name=`sysctl -n hw.model`
      ;;
    Darwin)
      cpu_family=`uname -p`
      model_name=`machine`
      ;;
    *)
      cpu_family=`uname -m`;
      model_name="unknown";
      model_name=`uname -p`;
      ;;
  esac
fi

cpu_flag=""
cpu_flag_old=""

# detect CPU shortname as used by gcc options 
# this list is not complete, feel free to add further entries
cpu_arg=""
case "$cpu_family--$model_name" in
  # DEC Alpha
  Alpha*EV6*)
    cpu_flag="ev6";
    cpu_arg="ev6";
    ;;

  # Intel ia32
  *Xeon*)
    cpu_flag="nocona";
    # a Xeon is just another pentium4 ...
    # ... unless it has the "lm" (long-mode) flag set, 
    # in that case it's a Xeon with EM64T support 
	if [ -z "$cpu_flag_lm" ]; then
      cpu_arg="pentium4";
	else
      cpu_arg="nocona";
    fi
    ;;
  *Pentium*4*Mobile*CPU*)
    cpu_flag="pentium4m";
  *Pentium*4*Mobile*)
    cpu_arg="pentium4m";
  ;;
  *Pentium*4*CPU*)
    cpu_flag="pentium4";
  *Pentium*4*)
    cpu_arg="pentium4";
    ;;
  *Pentium*III*Mobile*CPU*)
    cpu_flag="pentium3m";
  *Pentium*III*Mobile*)
    cpu_arg="pentium3m";
  ;;
  *Pentium*III*CPU*)
    cpu_flag="pentium3";
  *Pentium*III*)
    cpu_arg="pentium3";
  ;;
  *Pentium*M*pro*)
    cpu_flag="pentium-m";
    cpu_flag_old="pentium";
    cpu_arg="pentium-m";
  ;;
  *Athlon*64*)
    cpu_flag="athlon64";
    cpu_flag_old="athlon";
    cpu_arg="athlon64";
    ;;
  *Athlon*)
    cpu_flag="athlon";
    cpu_arg="athlon";
    ;;

  # Intel ia64
  *Itanium*)
    # Don't need to set any flags for itanium(at the moment)
    cpu_flag="";
    cpu_arg="";
    ;;
  *ppc)
    cpu_flag="powerpc";

  #
  *ppc*)
    cpu_arg='powerpc'
    ;;
 
  *powerpc*)
    cpu_arg='powerpc'
    ;;

  # unknown
  *)
    cpu_flag="";
    cpu_arg="";
    ;;
esac

if test -z "$cpu_flag"; then

if test -z "$cpu_arg"; then
  echo "BUILD/check-cpu: Oops, could not find out what kind of cpu this machine is using."
  check_cpu_flags=""
  check_cpu_cflags=""
  return
fi

echo "cpu_flag: $cpu_flag"

# different compiler versions have different option names
# for CPU specific command line options
if test -z "$CC" ; then
  cc="gcc";
else
  cc=$CC

fi

cc_ver=`$cc --version | sed 1q`
cc_verno=`echo $cc_ver | sed -e 's/[^0-9. ]//g;	 s/^ *//g; s/ .*//g'`

case "$cc_ver--$cc_verno" in
  *GCC*--3.4*|*GCC*--3.5*|*GCC*--4.*)
    check_cpu_cflags="-mtune=$cpu_flag -march=$cpu_flag"
    ;;
  *GCC*)
    # Fix for older compiler versions
    if test -n "$cpu_flag_old"; then
      cpu_flag="$cpu_flag_old"
    fi
    check_cpu_cflags="-mcpu=$cpu_flag -march=$cpu_flag"
      # different gcc backends (and versions) have different CPU flags
      case `gcc -dumpmachine` in
        i?86-*)
   	      case "$cc_verno" in
		    3.4*|3.5*|4.*)
			  check_cpu_args='-mtune=$cpu_arg -march=$cpu_arg'
			  ;;
		    *)
			  check_cpu_args='-mcpu=$cpu_arg -march=$cpu_arg'
			  ;;
          esac
          ;;
        ppc-*)
		  check_cpu_args='-mcpu=$cpu_arg -mtune=$cpu_arg'
          ;;
        *)
          check_cpu_cflags=""
          return
          ;;
      esac
    ;;
  2.95.*)
    # GCC 2.95 doesn't expose its name in --version output
    check_cpu_args='-m$cpu_arg'
    ;;
  *)
    check_cpu_cflags=""
    return
    ;;
esac
echo $check_cpu_cflags

# now we check whether the compiler really understands the cpu type
touch __test.c

while [ "$cpu_arg" ] ; do
  echo -n testing $cpu_arg "... "
	
  # compile check
  check_cpu_cflags=`eval echo $check_cpu_args`
  if $cc -c $check_cpu_cflags __test.c 2>/dev/null; then
	  echo ok
      break;
  fi

  echo failed
  check_cpu_cflags=""

  # if compile failed: check whether it supports a predecessor of this CPU
  # this list is not complete, feel free to add further entries
  case "$cpu_arg" in
    # Intel ia32
    nocona)     cpu_arg=pentium4    ;; 
    prescott)   cpu_arg=pentium4    ;;
    pentium4m)  cpu_arg=pentium4    ;;
    pentium4)   cpu_arg=pentium3    ;;
    pentium3m)  cpu_arg=pentium3    ;;
    pentium3)   cpu_arg=pentium2    ;;
    pentium2)   cpu_arg=pentiumpro  ;;
    pentiumpro) cpu_arg=pentium     ;;
    pentium)    cpu_arg=i486        ;;
    i486)       cpu_arg=i386        ;;

	# power / powerPC
	7450)       cpu_arg=7400        ;;

    *)          cpu_arg=""          ;;
  esac
done

rm __test.*
+15 −0
Original line number Diff line number Diff line
@@ -1184,23 +1184,37 @@ mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/README|20001013051514|26509|cd4
mwagner@evoq.home.mwagner.org|mysql-test/xml/xsl/mysqltest.xsl|20001013051514|27425|1b8f6ec4f1b5f634
mwagner@work.mysql.com|mysql-test/r/3.23/sel000001.result|20001010091454|28284|383913ae4505ec86
mwagner@work.mysql.com|mysql-test/r/3.23/sel000002.result|20001010091454|29230|d1787e6fd5dbc1cc
mysql-test/t/reserved_win_names-master.opt
ndb/src/client/Makefile
nick@nick.leippe.com|mysql-test/r/rpl_empty_master_crash.result|20020531235552|47718|615f521be2132141
nick@nick.leippe.com|mysql-test/t/rpl_empty_master_crash.test|20020531235552|52328|99464e737639ccc6
reggie@mdk10.(none)|BitKeeper/deleted/.del-reserved_win_names-master.opt~e56da049a7ce9a5b|20050523193219|41081
reggie@mdk10.(none)|mysql-test/t/reserved_win_names-master.opt|20050520210356|14878|e56da049a7ce9a5b
sasha@mysql.sashanet.com|BitKeeper/etc/logging_ok|20000801000905|12967|5b7d847a2158554
sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97
sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618
sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5
sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5
sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9
sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f
@@ -1209,6 +1223,7 @@ sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|2001042423392
sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d
sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503
sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e
sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f
sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a
sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18
sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c
+4 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ dlenev@mysql.com
ejonore@mc03.ndb.mysql.com
evgen@moonbone.(none)
evgen@moonbone.local
gbichot@bk-internal.mysql.com
gbichot@production.mysql.com
gbichot@quadita2.mysql.com
gbichot@quadxeon.mysql.com
@@ -87,6 +88,7 @@ hf@deer.mysql.r18.ru
hf@genie.(none)
holyfoot@mysql.com
igor@hundin.mysql.fi
igor@igor-inspiron.creware.com
igor@linux.local
igor@rurik.mysql.com
ingo@mysql.com
@@ -207,6 +209,7 @@ patg@krsna.patg.net
patg@patrick-galbraiths-computer.local
patg@patrick.local
patg@pc248.lfp.kcls.org
patg@radha.local
paul@central.snake.net
paul@frost.snake.net
paul@ice.local
@@ -237,6 +240,7 @@ rburnett@bk-internal.mysql.com
rburnett@build.mysql.com
reggie@bob.(none)
reggie@mdk10.(none)
reggie@monster.
root@home.(none)
root@mc04.(none)
root@x3.internalnet
+2 −2
Original line number Diff line number Diff line
@@ -106,8 +106,8 @@ test:

test-force:
	cd mysql-test; \
	mysql-test-run --force ;\
	mysql-test-run --ps-protocol --force
	./mysql-test-run --force ;\
	./mysql-test-run --ps-protocol --force

# Don't update the files from bitkeeper
%::SCCS/s.%
Loading