List:Commits« Previous MessageNext Message »
From:Joerg Bruehe Date:July 21 2009 4:59pm
Subject:bzr push into mysql-5.1 branch (joerg:2957 to 2959) Bug#37808
View as plain text  
 2959 Joerg Bruehe	2009-07-21 [merge]
      Merge the fix for bug#37808 into 5.1-build.

    modified:
      scripts/make_binary_distribution.sh
 2958 Joerg Bruehe	2009-07-21 [merge]
      Merge 5.0-build up into 5.1-build.
      This is just about a merge changeset, no code changes.

 2957 Joerg Bruehe	2009-07-16 [merge]
      Merge main 5.1 into 5.1-build.

    added:
      mysql-test/r/bug46080.result
      mysql-test/r/innodb_bug21704.result
      mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result
      mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test
      mysql-test/t/bug46080-master.opt
      mysql-test/t/bug46080.test
      mysql-test/t/innodb_bug21704.test
    modified:
      BUILD/check-cpu
      client/Makefile.am
      cmd-line-utils/readline/Makefile.am
      configure.in
      include/my_global.h
      include/myisammrg.h
      libmysql/Makefile.am
      mysql-test/include/mix1.inc
      mysql-test/include/mtr_warnings.sql
      mysql-test/lib/My/SafeProcess/safe_process.cc
      mysql-test/r/derived.result
      mysql-test/r/innodb_bug42101-nonzero.result
      mysql-test/r/innodb_bug42101.result
      mysql-test/r/innodb_mysql.result
      mysql-test/r/merge.result
      mysql-test/suite/parts/r/partition_auto_increment_memory.result
      mysql-test/suite/parts/r/partition_auto_increment_myisam.result
      mysql-test/t/derived.test
      mysql-test/t/innodb_bug42101-nonzero.test
      mysql-test/t/innodb_bug42101.test
      mysql-test/t/innodb_mysql.test
      mysql-test/t/merge.test
      sql/ha_partition.cc
      sql/item_sum.cc
      sql/rpl_rli.cc
      sql/sql_select.cc
      sql/sql_yacc.yy
      storage/heap/ha_heap.cc
      storage/heap/ha_heap.h
      storage/ibmdb2i/ha_ibmdb2i.cc
      storage/ibmdb2i/ha_ibmdb2i.h
      storage/innobase/Makefile.am
      storage/innobase/fil/fil0fil.c
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/trx0sys.ic
      storage/innobase/trx/trx0purge.c
      storage/innobase/trx/trx0sys.c
      storage/innobase/trx/trx0undo.c
      storage/myisam/ha_myisam.cc
      storage/myisam/ha_myisam.h
      storage/myisammrg/ha_myisammrg.cc
      storage/myisammrg/myrg_open.c
      tests/Makefile.am
=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh	2009-03-31 15:31:17 +0000
+++ b/scripts/make_binary_distribution.sh	2009-07-21 07:36:43 +0000
@@ -56,6 +56,12 @@ SOURCE=`pwd`
 CP="cp -p"
 MV="mv"
 
+# There are platforms, notably OS X on Intel (x86 + x86_64),
+# for which "uname" does not provide sufficient information.
+# The value of CFLAGS as used during compilation is the most exact info
+# we can get - after all, we care about _what_ we built, not _where_ we did it.
+cflags="@CFLAGS@"
+
 STRIP=1				# Option ignored
 SILENT=0
 PLATFORM=""
@@ -104,7 +110,50 @@ if [ x"$PLATFORM" = x"" ] ; then
   system=`echo $system | sed -e 's/linux-gnu/linux/g'`
   system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'`
   system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'`
+fi
+
+# Get the "machine", which really is the CPU architecture (including the size).
+# The precedence is:
+# 1) use an explicit argument, if given;
+# 2) use platform-specific fixes, if there are any (see bug#37808);
+# 3) stay with the default (determined during "configure", using predefined macros).
+
+if [ x"$MACHINE" != x"" ] ; then
+  machine=$MACHINE
+else
+  case $system in
+    osx* )
+      # Extract "XYZ" from CFLAGS "... -arch XYZ ...", or empty!
+      cflag_arch=`echo "$cflags" | sed -n -e 's=.* -arch \([^ ]*\) .*=\1=p'`
+      case "$cflag_arch" in
+        i386 )    case $system in
+                    osx10.4 )  machine=i686 ;; # Used a different naming
+                    * )        machine=x86 ;;
+                  esac ;;
+        x86_64 )  machine=x86_64 ;;
+        ppc )     ;;  # No treatment needed with PPC
+        ppc64 )   ;;
+        * ) # No matching compiler flag? "--platform" is needed
+            if [ x"$PLATFORM" != x"" ] ; then
+              :  # See below: "$PLATFORM" will take precedence anyway
+            elif [ "$system" = "osx10.3" -a -z "$cflag_arch" ] ; then
+              :  # Special case of OS X 10.3, which is PPC-32 only and doesn't use "-arch"
+            else
+              echo "On system '$system' only specific '-arch' values are expected."
+              echo "It is taken from the 'CFLAGS' whose value is:"
+              echo "$cflags"
+              echo "'-arch $cflag_arch' is unexpected, and no '--platform' was given: ABORT"
+              exit 1
+            fi ;;
+      esac  # "$cflag_arch"
+      ;;
+  esac  # $system
+fi
 
+# Combine OS and CPU to the "platform". Again, an explicit argument takes precedence.
+if [ x"$PLATFORM" != x"" ] ; then
+  :  
+else
   PLATFORM="$system-$machine"
 fi
 
@@ -153,10 +202,10 @@ which_1 ()
     do
       for file in $d/$cmd
       do
-	if [ -x $file -a ! -d $file ] ; then
-	  echo $file
-	  exit 0
-	fi
+        if [ -x $file -a ! -d $file ] ; then
+          echo $file
+          exit 0
+        fi
       done
     done
   done
@@ -460,7 +509,7 @@ rm -f   $BASE/support-files/magic \
         $BASE/support-files/mysql-log-rotate \
         $BASE/support-files/binary-configure \
         $BASE/support-files/build-tags \
-	$BASE/support-files/MySQL-shared-compat.spec \
+        $BASE/support-files/MySQL-shared-compat.spec \
         $BASE/INSTALL-BINARY
 
 # Clean up if we did this from a bk tree


Attachment: [text/bzr-bundle] bzr/joerg@mysql.com-20090721164942-ms7fzkl162nmpu4m.bundle
Thread
bzr push into mysql-5.1 branch (joerg:2957 to 2959) Bug#37808Joerg Bruehe21 Jul