summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/FINISH.sh10
-rw-r--r--BUILD/Makefile.am1
-rwxr-xr-x[-rw-r--r--]BUILD/SETUP.sh48
-rwxr-xr-xBUILD/check-cpu81
-rwxr-xr-xBUILD/cleanup8
-rwxr-xr-xBUILD/compile-amd64-debug-max9
-rwxr-xr-xBUILD/compile-amd64-max8
-rwxr-xr-xBUILD/compile-darwin-mwcc54
-rwxr-xr-xBUILD/compile-dist3
-rwxr-xr-xBUILD/compile-hpux11-parisc2-aCC80
-rwxr-xr-xBUILD/compile-ia64-debug-max2
-rwxr-xr-xBUILD/compile-irix-mips64-mipspro8
-rwxr-xr-xBUILD/compile-pentium-cybozu9
-rwxr-xr-xBUILD/compile-pentium-debug4
-rwxr-xr-xBUILD/compile-pentium-debug-max6
-rwxr-xr-xBUILD/compile-pentium-debug-max-no-embedded11
-rwxr-xr-xBUILD/compile-pentium-debug-openssl2
-rwxr-xr-xBUILD/compile-pentium-gcov2
-rwxr-xr-xBUILD/compile-pentium-max9
-rwxr-xr-xBUILD/compile-pentium-valgrind-max38
-rwxr-xr-xBUILD/compile-pentium64-debug13
-rwxr-xr-xBUILD/compile-ppc10
-rwxr-xr-xBUILD/compile-ppc-debug13
-rwxr-xr-xBUILD/compile-ppc-debug-max11
-rwxr-xr-xBUILD/compile-ppc-max9
-rwxr-xr-xBUILD/compile-solaris-sparc-purify101
26 files changed, 483 insertions, 67 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh
index 32a4efefdfb..094eb8275d6 100644
--- a/BUILD/FINISH.sh
+++ b/BUILD/FINISH.sh
@@ -23,12 +23,16 @@ autoconf || (echo \"Can't execute autoconf\" && exit 1)
if [ -d gemini ]
then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
-fi
+fi"
+if [ -z "$just_clean" ]
+then
+commands="$commands
CFLAGS=\"$cflags\" CXX=\"$CXX\" CXXFLAGS=\"$cxxflags\" CXXLDFLAGS=\"$CXXLDFLAGS\" \
$configure"
+fi
-if [ -z "$just_configure" ]
+if [ -z "$just_configure" -a -z "$just_clean" ]
then
commands="$commands
@@ -45,7 +49,7 @@ strip sql/mysqld"
fi
fi
-if test -z "$nonono"
+if test -z "$just_print"
then
eval "set -x; $commands"
else
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am
index 2414d4f3a44..9f3c55c20d5 100644
--- a/BUILD/Makefile.am
+++ b/BUILD/Makefile.am
@@ -38,6 +38,7 @@ EXTRA_DIST = FINISH.sh \
compile-solaris-sparc \
compile-solaris-sparc-debug \
compile-irix-mips64-mipspro \
+ compile-hpux11-parisc2-aCC \
compile-solaris-sparc-forte \
compile-solaris-sparc-purify
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 150f9e28b41..8bb281f20e9 100644..100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -1,27 +1,36 @@
+#!/bin/sh
+
if ! test -f sql/mysqld.cc
then
echo "You must run this script from the MySQL top-level directory"
exit 1
fi
-nonono=
+prefix_configs="--prefix=/usr/local/mysql"
+just_print=
just_configure=
+full_debug=
while test $# -gt 0
do
case "$1" in
+ --prefix=* ) prefix_configs="$1"; shift ;;
+ --with-debug=full ) full_debug="=full"; shift ;;
-c | --just-configure ) just_configure=1; shift ;;
- -n | --just-print | --print ) nonono=1; shift ;;
+ -n | --just-print | --print ) just_print=1; shift ;;
-h | --help ) cat <<EOF; exit 0 ;;
Usage: $0 [-h|-n] [configure-options]
-h, --help Show this help message.
-n, --just-print Don't actually run any commands; just print them.
-c, --just-configure Stop after running configure.
-
-Any other options will be passed directly to configure.
+ --with-debug=full Build with full debug.
+ --prefix=path Build with prefix 'path'.
Note: this script is intended for internal use by MySQL developers.
EOF
- * ) break ;;
+ * )
+ echo "Unknown option '$1'"
+ exit 1
+ break ;;
esac
done
@@ -39,8 +48,19 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch
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"
+base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
+max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
+max_no_es_configs="$max_leave_isam_configs --without-isam"
+max_configs="$max_no_es_configs --with-embedded-server"
+
+path=`dirname $0`
+. "$path/check-cpu"
+
+alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag"
+amd64_cflags="$check_cpu_cflags -DBIG_TABLES"
+pentium_cflags="$check_cpu_cflags"
+pentium64_cflags="$check_cpu_cflags -m64"
+ppc_cflags="$check_cpu_cflags"
sparc_cflags=""
# be as fast as we can be without losing our ability to backtrace
@@ -48,12 +68,16 @@ fast_cflags="-O3 -fno-omit-frame-pointer"
# this is one is for someone who thinks 1% speedup is worth not being
# able to backtrace
reckless_cflags="-O3 -fomit-frame-pointer "
-debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1 -Wuninitialized"
+
+debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
+debug_extra_cflags="-O1 -Wuninitialized"
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
+amd64_cxxflags="-DBIG_TABLES"
-base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client"
+base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline"
static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static"
+amd64_configs=""
alpha_configs="" # Not used yet
pentium_configs=""
sparc_configs=""
@@ -62,7 +86,11 @@ sparc_configs=""
# and unset local_infile_configs
local_infile_configs="--enable-local-infile"
-debug_configs="--with-debug"
+debug_configs="--with-debug$full_debug"
+if [ -z "$full_debug" ]
+then
+ debug_cflags="$debug_cflags $debug_extra_cflags"
+fi
if gmake --version > /dev/null 2>&1
then
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
new file mode 100755
index 00000000000..553df39191f
--- /dev/null
+++ b/BUILD/check-cpu
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# Check cpu of current machine and find the
+# best compiler optimization flags for gcc
+#
+#
+
+if test -r /proc/cpuinfo ; then
+ cpuinfo="cat /proc/cpuinfo"
+ 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
+ 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
+ if test -z "$model_name" ; then
+ model_name=`uname -m`
+ fi
+fi
+
+case "$cpu_family--$model_name" in
+ Alpha*EV6*)
+ cpu_flag="ev6";
+ ;;
+ *Xeon*)
+ cpu_flag="nocona";
+ ;;
+ *Pentium*4*CPU*)
+ cpu_flag="pentium4";
+ ;;
+ *Athlon*64*)
+ cpu_flag="athlon64";
+ ;;
+ *Athlon*)
+ cpu_flag="athlon";
+ ;;
+ *Itanium*)
+ # Don't need to set any flags for itanium(at the moment)
+ cpu_flag="";
+ ;;
+ *ppc)
+ cpu_flag="powerpc";
+ ;;
+ *)
+ cpu_flag="";
+ ;;
+esac
+
+if test -z "$cpu_flag"; then
+ echo "BUILD/check-cpu: Oops, could not findout what kind of cpu this machine is using."
+ check_cpu_flags=""
+ return
+fi
+
+echo "cpu_flag: $cpu_flag"
+
+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*)
+ check_cpu_cflags="-mcpu=$cpu_flag -march=$cpu_flag"
+ ;;
+ *)
+ check_cpu_cflags=""
+ ;;
+esac
+echo $check_cpu_cflags
diff --git a/BUILD/cleanup b/BUILD/cleanup
new file mode 100755
index 00000000000..518c5722d87
--- /dev/null
+++ b/BUILD/cleanup
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+just_clean=1;
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-amd64-debug-max b/BUILD/compile-amd64-debug-max
new file mode 100755
index 00000000000..530bdba009b
--- /dev/null
+++ b/BUILD/compile-amd64-debug-max
@@ -0,0 +1,9 @@
+#! /bin/sh
+path=`dirname $0`
+. "$path/SETUP.sh"
+extra_flags="$amd64_cflags $debug_cflags $max_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$amd64_configs $debug_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-amd64-max b/BUILD/compile-amd64-max
new file mode 100755
index 00000000000..228448f6392
--- /dev/null
+++ b/BUILD/compile-amd64-max
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+extra_flags="$amd64_cflags $fast_cflags $max_cflags -g"
+extra_configs="$amd64_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc
new file mode 100755
index 00000000000..6fd0eab7e26
--- /dev/null
+++ b/BUILD/compile-darwin-mwcc
@@ -0,0 +1,54 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+c_warnings=""
+cxx_warnings=""
+fast_cflags="-O3"
+base_cxxflags="-fno-handle-exceptions"
+
+# FIXME do we need to link static, not to depend on CodeWarrior libs?
+
+if [ x$MODE = x ] ; then
+ echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
+ echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
+ exit 1
+else
+ case $MODE in
+ standard|pro-gpl)
+ # FIXME pro/pro-gpl different libedit/readline
+ extra_flags="$ppc_cflags $fast_cflags"
+ ;;
+ pro)
+ # FIXME pro/pro-gpl different libedit/readline
+ extra_flags="$ppc_cflags $fast_cflags"
+ extra_configs="--with-libedit"
+ ;;
+ max)
+ extra_flags="$ppc_cflags $fast_cflags"
+ extra_configs="$max_configs"
+ ;;
+ debug)
+ extra_flags="$ppc_cflags $debug_cflags"
+ c_warnings="$c_warnings $debug_extra_warnings"
+ cxx_warnings="$cxx_warnings $debug_extra_warnings"
+ extra_configs="$debug_configs"
+ ;;
+ debug-max)
+ extra_flags="$ppc_cflags $debug_cflags $max_cflags"
+ c_warnings="$c_warnings $debug_extra_warnings"
+ cxx_warnings="$cxx_warnings $debug_extra_warnings"
+ extra_configs="$debug_configs $max_configs"
+ ;;
+ *)
+ echo "You need to give an argument, 'standard', 'max', 'debug' or 'debug-max'"
+ echo "Like: MODE=standard BUILD/compile-darwin-codewarrior"
+ exit 1
+ ;;
+ esac
+fi
+
+extra_configs="$extra_configs --with-darwin-mwcc"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-dist b/BUILD/compile-dist
index 51afd104491..39095f59ffa 100755
--- a/BUILD/compile-dist
+++ b/BUILD/compile-dist
@@ -48,5 +48,6 @@ fi
--with-berkeley-db \
--with-innodb \
--enable-thread-safe-client \
- --with-extra-charsets=complex
+ --with-extra-charsets=complex \
+ --with-ndbcluster
make
diff --git a/BUILD/compile-hpux11-parisc2-aCC b/BUILD/compile-hpux11-parisc2-aCC
new file mode 100755
index 00000000000..2fc7a6d2b6e
--- /dev/null
+++ b/BUILD/compile-hpux11-parisc2-aCC
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+if [ ! -f "sql/mysqld.cc" ]; then
+ echo "You must run this script from the MySQL top-level directory."
+ exit 1
+fi
+
+# -fast Expand into a set of compiler options to result in
+# improved application run-time. Options include: +O3,
+# +Onolooptransform, +Olibcalls, +FPD, +Oentryschedule,
+# +Ofastaccess.
+# +O4 Perform level 3 as well as doing link time optimizations.
+# Also sends +Oprocelim and +Ofastaccess to the linker
+# (see ld(1)).
+
+release_flags="-fast +O3"
+
+# -z Do not bind anything to address zero. This option
+# allows runtime detection of null pointers. See the
+# note on pointers below.
+cflags="-g -z +O0"
+cxxflags="-g0 -z +O0"
+debug_configure_options="--with-debug"
+
+while [ "$#" != 0 ]; do
+ case "$1" in
+ --help)
+ echo "Usage: $0 [options]"
+ echo "Options:"
+ echo "--help print this message"
+ echo "--debug build debug binary [default] "
+ echo "--release build optimised binary"
+ echo "-32 build 32 bit binary [default]"
+ echo "-64 build 64 bit binary"
+ exit 0
+ ;;
+ --debug)
+ echo "Building debug binary"
+ ;;
+ --release)
+ echo "Building release binary"
+ cflags="$release_flags"
+ cxxflags="$release_flags"
+ debug_configure_options=""
+ ;;
+ -32)
+ echo "Building 32-bit binary"
+ ;;
+ -64)
+ echo "Building 64-bit binary"
+ cflags="$cflags +DA2.0W +DD64"
+ cxxflags="$cxxflags +DA2.0W +DD64"
+ ;;
+ *)
+ echo "$0: invalid option '$1'; use --help to show usage"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
+
+set -x
+make distclean
+aclocal
+autoheader
+libtoolize --automake --force
+automake --force --add-missing
+autoconf
+
+(cd bdb/dist && sh s_all)
+(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
+
+CC=cc CXX=aCC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
+./configure --prefix=/usr/local/mysql --disable-shared \
+ --with-extra-charsets=complex --enable-thread-safe-client \
+ --without-extra-tools $debug_configure_options \
+ --disable-dependency-tracking
+
+gmake
diff --git a/BUILD/compile-ia64-debug-max b/BUILD/compile-ia64-debug-max
index 9cd54de428d..56c36059ea9 100755
--- a/BUILD/compile-ia64-debug-max
+++ b/BUILD/compile-ia64-debug-max
@@ -9,5 +9,5 @@ then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi
-CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server
+CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server --with-archive-storage-engine
gmake
diff --git a/BUILD/compile-irix-mips64-mipspro b/BUILD/compile-irix-mips64-mipspro
index d8107ad73c0..1987fa13b1f 100755
--- a/BUILD/compile-irix-mips64-mipspro
+++ b/BUILD/compile-irix-mips64-mipspro
@@ -6,7 +6,7 @@ if [ ! -f "sql/mysqld.cc" ]; then
fi
cflags="-64 -mips4"
-
+config_args=
if [ "$#" != 0 ]; then
case "$1" in
--help)
@@ -25,8 +25,7 @@ if [ "$#" != 0 ]; then
cflags=""
;;
*)
- echo "$0: invalid option '$1'; use --help to show usage"
- exit 1
+ config_args="$config_args $1"; shift
;;
esac
else
@@ -79,6 +78,7 @@ cxxflags="$cxxflags -LANG:libc_in_namespace_std=OFF"
CC=cc CXX=CC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
./configure --prefix=/usr/local/mysql --disable-shared \
--with-extra-charsets=complex --enable-thread-safe-client \
- --without-extra-tools --disable-dependency-tracking
+ --without-extra-tools --disable-dependency-tracking \
+ $config_args
make
diff --git a/BUILD/compile-pentium-cybozu b/BUILD/compile-pentium-cybozu
new file mode 100755
index 00000000000..841635985a1
--- /dev/null
+++ b/BUILD/compile-pentium-cybozu
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium_cflags $fast_cflags -g"
+extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug
index d8a6b60809b..4a9d0e74599 100755
--- a/BUILD/compile-pentium-debug
+++ b/BUILD/compile-pentium-debug
@@ -6,8 +6,8 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
-extra_configs="$pentium_configs $debug_configs $static_link"
+extra_configs="$pentium_configs $debug_configs "
-extra_configs="$extra_configs "
+extra_configs="$extra_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max
index af9bed1569f..420657e0b73 100755
--- a/BUILD/compile-pentium-debug-max
+++ b/BUILD/compile-pentium-debug-max
@@ -3,11 +3,9 @@
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags $debug_cflags"
+extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
-extra_configs="$pentium_configs $debug_configs"
-
-extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl --with-vio --with-raid"
+extra_configs="$pentium_configs $debug_configs $max_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug-max-no-embedded b/BUILD/compile-pentium-debug-max-no-embedded
new file mode 100755
index 00000000000..803a6a9d6d3
--- /dev/null
+++ b/BUILD/compile-pentium-debug-max-no-embedded
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium_cflags $debug_cflags $max_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$pentium_configs $debug_configs $max_no_es_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug-openssl b/BUILD/compile-pentium-debug-openssl
index 5de1c18a5d7..68d99b6eda6 100755
--- a/BUILD/compile-pentium-debug-openssl
+++ b/BUILD/compile-pentium-debug-openssl
@@ -8,6 +8,6 @@ c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"
-extra_configs="$extra_configs --with-debug=full --with-vio --with-openssl --without-innodb"
+extra_configs="$extra_configs --with-debug=full --with-openssl"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov
index 39c0e0591e8..05cb0bb0d78 100755
--- a/BUILD/compile-pentium-gcov
+++ b/BUILD/compile-pentium-gcov
@@ -3,7 +3,7 @@
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags -O2 -fprofile-arcs -ftest-coverage -fmessage-length=0 "
+extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage"
extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
extra_configs="$extra_configs --with-innodb --with-berkeley-db"
diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max
index 34a497807df..595581f604e 100755
--- a/BUILD/compile-pentium-max
+++ b/BUILD/compile-pentium-max
@@ -3,12 +3,7 @@
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags $fast_cflags"
-extra_configs="$pentium_configs"
-strip=yes
-
-extra_configs="$extra_configs --with-innodb --with-berkeley-db \
- --with-embedded-server --enable-thread-safe-client \
- --with-openssl --with-vio --with-raid"
+extra_flags="$pentium_cflags $fast_cflags $max_cflags -g"
+extra_configs="$pentium_configs $max_configs"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max
index c5359585046..f0dc92c2ffd 100755
--- a/BUILD/compile-pentium-valgrind-max
+++ b/BUILD/compile-pentium-valgrind-max
@@ -1,37 +1,29 @@
#! /bin/sh
-echo "\
-********************************************************************************
-Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
---enable-assembler. When Valgrind detects an error involving an assembly
-function (for example an uninitialized value used as an argument of an assembly
-function), Valgrind will not print the stacktrace and 'valgrind
---gdb-attach=yes' will not work either. If you need a stacktrace in those cases,
-you have to run BUILD/compile-pentium-valgrind-max with the --disable-assembler
-argument.
-********************************************************************************
-"
-
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags $debug_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
+extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"
-extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl"
+# We want to test isam when building with valgrind
+extra_configs="$extra_configs $max_leave_isam_configs --with-isam"
. "$path/FINISH.sh"
-echo "\
-********************************************************************************
+if test -z "$just_print"
+then
+ set +v +x
+ echo "\
+******************************************************************************
Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with
--enable-assembler. When Valgrind detects an error involving an assembly
-function (for example an uninitialized value used as an argument of an assembly
-function), Valgrind will not print the stacktrace and 'valgrind
---gdb-attach=yes' will not work either. If you need a stacktrace in those cases,
-you have to run BUILD/compile-pentium-valgrind-max with the --disable-assembler
-argument.
-********************************************************************************
-"
+function (for example an uninitialized value used as an argument of an
+assembly function), Valgrind will not print the stacktrace and 'valgrind
+--gdb-attach=yes' will not work either. If you need a stacktrace in those
+cases, you have to run BUILD/compile-pentium-valgrind-max with the
+--disable-assembler argument.
+******************************************************************************"
+fi
diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug
new file mode 100755
index 00000000000..0299669f79a
--- /dev/null
+++ b/BUILD/compile-pentium64-debug
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh" $@ --with-debug=full
+
+extra_flags="$pentium64_cflags $debug_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$pentium_configs $debug_configs $static_link"
+
+extra_configs="$extra_configs "
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-ppc b/BUILD/compile-ppc
new file mode 100755
index 00000000000..d248ecf2677
--- /dev/null
+++ b/BUILD/compile-ppc
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$ppc_cflags $fast_cflags"
+extra_configs="$static_link"
+strip=yes
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-ppc-debug b/BUILD/compile-ppc-debug
new file mode 100755
index 00000000000..2be11eaaf22
--- /dev/null
+++ b/BUILD/compile-ppc-debug
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$ppc_cflags $debug_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$debug_configs "
+
+extra_configs="$extra_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-ppc-debug-max b/BUILD/compile-ppc-debug-max
new file mode 100755
index 00000000000..49d1442fd45
--- /dev/null
+++ b/BUILD/compile-ppc-debug-max
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$ppc_cflags $debug_cflags $max_cflags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$debug_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-ppc-max b/BUILD/compile-ppc-max
new file mode 100755
index 00000000000..1d89be81c9c
--- /dev/null
+++ b/BUILD/compile-ppc-max
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$ppc_cflags $fast_cflags $max_cflags -g"
+extra_configs="$extra_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify
index 71a60e45cb0..5f5ba81396f 100755
--- a/BUILD/compile-solaris-sparc-purify
+++ b/BUILD/compile-solaris-sparc-purify
@@ -1,15 +1,35 @@
#! /bin/sh
+mode=""
+cxxfilt=""
+
+# For g++ 3.X, the PurifyPlus tools needs a program named "cxxfilt",
+# "c++file" or similar. It is part of libtool. If not found, you can
+# specify the path to it.
+
while test $# -gt 0
do
case "$1" in
- --debug) EXTRA_CONFIG_FLAGS=--with-debug; shift ;;
- -h | --help ) cat <<EOF; exit 0 ;;
-Usage: $0 [-h|-n] [configure-options]
- --debug Compile with DBUG enabled
+ --debug) EXTRA_CONFIG_FLAGS=--with-debug ;;
+ --purify) mode=purify ;;
+ --purecov*) mode=purecov ;;
+ --quantify) mode=quantify ;;
+ --cxxfilt) shift ; cxxfilt=$1 ;;
+ -h | --help ) cat <<EOF; exit 0 ;;
+Usage: $0 [ options ]
+
+Where the 'options' are
+
+ --debug Compile with DBUG enabled
+ --purify Only prepare for Purify
+ --purecov Only prepare for PureCover
+ --quantify Only prepare for Quantify
+ --cxxfilt <cxxfilt> Path to cxxfilt/c++filt program
+ This program is needed for gcc 3.X
EOF
- *) echo "No such option '$1'" ; exit ;;
+ *) echo "No such option '$1'" ; exit 1 ;;
esac
+ shift
done
gmake -k clean || true
@@ -22,9 +42,70 @@ CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-sub
gmake -j 4
-cd sql ; mv mysqld mysqld-org ;
-make CXXLD="purify -best-effort g++" mysqld ; mv mysqld mysqld-purify
-make CXXLD="quantify -best-effort g++" mysqld ; mv mysqld mysqld-quantify
-make CXXLD="purecov -best-effort g++" mysqld ; mv mysqld mysqld-purecov
-mv mysqld-org mysqld
+# ----------------------------------------------------------------------
+
+#set -x
+
+purifying_binaries ()
+{
+ while test $1
+ do
+ dir=$1
+ shift
+ target=$1
+ shift
+ binary=$1
+ shift
+
+ opts=""
+ if [ -n "$cxxfilt" ] ; then
+ opts="$opts -demangle-program=$cxxfilt"
+ fi
+ opts="$opts -best-effort"
+
+ back=`pwd`
+ cd $dir
+
+ # Because of libtool magic, the target and binary
+ # created might not be the same. To trigger rebuild,
+ # we need to move them both.
+
+ mv $binary $binary-old
+ if [ -f $target ] ; then
+ mv $target $target-old
+ fi
+
+ if [ -n "$mode" -a $mode = purify ] ; then
+ gmake CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target
+ mv $binary $binary-purify
+ fi
+
+ if [ -n "$mode" -a $mode = quantify ] ; then
+ gmake CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target
+ mv $binary $binary-quantify
+ fi
+
+ if [ -n "$mode" -a $mode = purecov ] ; then
+ gmake CCLD="purecov $opts gcc" CXXLD="purecov $opts g++" $target
+ mv $binary $binary-purecov
+ fi
+
+ mv $binary-old $binary
+ if [ -f $target-old ] ; then
+ mv $target-old $target
+ fi
+
+ cd $back
+ done
+}
+
+
+purifying_binaries \
+ sql mysqld mysqld \
+ client mysqltest .libs/mysqltest \
+ tests mysql_client_test mysql_client_test \
+ libmysqld/examples mysqltest_embedded mysqltest_embedded \
+ libmysqld/examples mysql_client_test_embedded mysql_client_test_embedded
+
+# ----------------------------------------------------------------------