diff options
Diffstat (limited to 'BUILD')
41 files changed, 290 insertions, 229 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 2fc8015ea28..6f0600c9de3 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -5,8 +5,7 @@ configure="./configure $base_configs $extra_configs" commands="\ $make -k distclean || true -/bin/rm -rf */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache bdb/dist/autom4te.cache autom4te.cache innobase/autom4te.cache; - +/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache; path=`dirname $0` . \"$path/autorun.sh\"" diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am index 3fd61790903..46814a077de 100644 --- a/BUILD/Makefile.am +++ b/BUILD/Makefile.am @@ -38,7 +38,6 @@ EXTRA_DIST = FINISH.sh \ compile-pentium-debug-max \ compile-pentium-debug-max-no-embedded \ compile-pentium-debug-max-no-ndb \ - compile-pentium-debug-no-bdb \ compile-pentium-debug-openssl \ compile-pentium-debug-yassl \ compile-pentium-gcov \ diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 27c468daa6a..d2534d42b33 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -1,108 +1,172 @@ #!/bin/sh +######################################################################## + +get_key_value() +{ + echo "$1" | sed 's/^--[a-zA-Z_-]*=//' +} + +usage() +{ +cat <<EOF +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. + --with-debug=full Build with full debug. + --warning-mode=[old|pedantic] + Influences the debug flags. Old is default. + --prefix=path Build with prefix 'path'. + +Note: this script is intended for internal use by MySQL developers. +EOF +} + +parse_options() +{ + while test $# -gt 0 + do + case "$1" in + --prefix=*) + prefix=`get_key_value "$1"`;; + --with-debug=full) + full_debug="=full";; + --warning-mode=*) + warning_mode=`get_key_value "$1"`;; + -c | --just-configure) + just_configure=1;; + -n | --just-print | --print) + just_print=1;; + -h | --help) + usage + exit 0;; + *) + echo "Unknown option '$1'" + exit 1;; + esac + shift + done +} + +######################################################################## + if test ! -f sql/mysqld.cc then echo "You must run this script from the MySQL top-level directory" exit 1 fi -prefix_configs="--prefix=/usr/local/mysql" +prefix="/usr/local/mysql" just_print= just_configure= full_debug= +warning_mode= + +parse_options "$@" + if test -n "$MYSQL_BUILD_PREFIX" then - prefix_configs="--prefix=$MYSQL_BUILD_PREFIX" + prefix="$MYSQL_BUILD_PREFIX" fi -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 ) 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. - --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 - * ) - echo "Unknown option '$1'" - exit 1 - break ;; - esac -done - set -e +# +# Check for the CPU and set up CPU specific flags. We may reset them +# later. +# +path=`dirname $0` +. "$path/check-cpu" + export AM_MAKEFLAGS AM_MAKEFLAGS="-j 4" -# SSL library to use. -SSL_LIBRARY=--with-yassl +# SSL library to use.--with-ssl will select our bundled yaSSL +# implementation of SSL. To use openSSl you will nee too point out +# the location of openSSL headers and lbs on your system. +# Ex --with-ssl=/usr +SSL_LIBRARY=--with-ssl -# If you are not using codefusion add "-Wpointer-arith" to WARNINGS -# The following warning flag will give too many warnings: -# -Wunused -Winline (The later isn't usable in C++ as -# __attribute()__ doesn't work with gnu C++) +if [ "x$warning_mode" != "xpedantic" ]; then +# Both C and C++ warnings + warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W" + warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare" + warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable" -global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable" -# # For more warnings, uncomment the following line -# global_warnings="$global_warnings -Wshadow" - -c_warnings="$global_warnings -Wunused" -cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" -base_max_configs="--with-innodb --with-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY" -base_max_no_ndb_configs="--with-innodb --without-ndbcluster --with-archive-storage-engine --with-big-tables --with-blackhole-storage-engine --with-federated-storage-engine --with-csv-storage-engine $SSL_LIBRARY" -max_leave_isam_configs="--with-innodb --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-blackhole-storage-engine --with-csv-storage-engine $SSL_LIBRARY --with-embedded-server --with-big-tables" -max_configs="$base_max_configs --with-embedded-server" -max_no_ndb_configs="$base_max_no_ndb_configs --with-embedded-server" - -path=`dirname $0` -. "$path/check-cpu" - -alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag" -amd64_cflags="$check_cpu_cflags" -pentium_cflags="$check_cpu_cflags" -pentium64_cflags="$check_cpu_cflags -m64" -ppc_cflags="$check_cpu_cflags" -sparc_cflags="" +# warnings="$global_warnings -Wshadow" + +# C warnings + c_warnings="$warnings -Wunused-parameter" +# C++ warnings + cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder" + cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor" +# Added unless --with-debug=full + debug_extra_cflags="-O1 -Wuninitialized" +else + warnings="-W -Wall -ansi -pedantic -Wno-long-long -D_POSIX_SOURCE" + c_warnings="$warnings" + cxx_warnings="$warnings -std=c++98" +# NOTE: warning mode should not influence optimize/debug mode. +# Please feel free to add a separate option if you don't feel it's an overkill. + debug_extra_cflags="-O0" +# Reset CPU flags (-mtune), they don't work in -pedantic mode + check_cpu_cflags="" +fi -# be as fast as we can be without losing our ability to backtrace +# Set flags for various build configurations. +# Used in -valgrind builds +valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify " +valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max" +# +# Used in -debug builds +debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS " +debug_cflags="$debug_cflags -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX" +error_inject="--with-error-inject " +# +# Base C++ flags for all builds +base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti" +# +# Flags for optimizing builds. +# Be as fast as we can be without losing our ability to backtrace. 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" -debug_extra_cflags="-O1 -Wuninitialized" +debug_configs="--with-debug$full_debug" +if [ -z "$full_debug" ] +then + debug_cflags="$debug_cflags $debug_extra_cflags" +fi -base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti" -amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES" - -base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline --with-big-tables" -static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static" -amd64_configs="" -alpha_configs="" # Not used yet -pentium_configs="" -sparc_configs="" +# +# Configuration options. +# +base_configs="--prefix=$prefix --enable-assembler " +base_configs="$base_configs --with-extra-charsets=complex " +base_configs="$base_configs --enable-thread-safe-client --with-readline " +base_configs="$base_configs --with-big-tables" + +static_link="--with-mysqld-ldflags=-all-static " +static_link="$static_link --with-client-ldflags=-all-static" # we need local-infile in all binaries for rpl000001 # if you need to disable local-infile in the client, write a build script # and unset local_infile_configs local_infile_configs="--enable-local-infile" -debug_configs="--with-debug$full_debug" -if [ -z "$full_debug" ] -then - debug_cflags="$debug_cflags $debug_extra_cflags" -fi + +max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max" +max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server" +max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server" + +# +# CPU and platform specific compilation flags. +# +alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag" +amd64_cflags="$check_cpu_cflags" +amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES" +pentium64_cflags="$check_cpu_cflags -m64" +ppc_cflags="$check_cpu_cflags" +sparc_cflags="" if gmake --version > /dev/null 2>&1 then @@ -123,7 +187,7 @@ fi # (http://samba.org/ccache) is installed, use it. # We use 'grep' and hope 'grep' will work as expected # (returns 0 if finds lines) -if ccache -V > /dev/null 2>&1 +if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1" then echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC" echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX" diff --git a/BUILD/autorun.sh b/BUILD/autorun.sh index f5986720b48..def229e21a0 100755 --- a/BUILD/autorun.sh +++ b/BUILD/autorun.sh @@ -3,19 +3,20 @@ die() { echo "$@"; exit 1; } +# Added glibtoolize reference to make native OSX autotools work +if [ -f /usr/bin/glibtoolize ] + then + LIBTOOLIZE=glibtoolize + else + LIBTOOLIZE=libtoolize +fi + aclocal || die "Can't execute aclocal" autoheader || die "Can't execute autoheader" # --force means overwrite ltmain.sh script if it already exists -# Added glibtoolize reference to make native OSX autotools work -if test -f /usr/bin/glibtoolize ; then - glibtoolize --automake --force || die "Can't execute glibtoolize" -else - libtoolize --automake --force || die "Can't execute libtoolize" -fi +$LIBTOOLIZE --automake --force || die "Can't execute libtoolize" # --add-missing instructs automake to install missing auxiliary files # and --force to overwrite them if they already exist automake --add-missing --force || die "Can't execute automake" autoconf || die "Can't execute autoconf" -(cd bdb/dist && sh s_all) -(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) diff --git a/BUILD/check-cpu b/BUILD/check-cpu index db1a016ec67..9edde51402f 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` @@ -33,6 +37,7 @@ check_cpu () { done else # Fallback when there is no /proc/cpuinfo + CPUINFO=" " case "`uname -s`" in FreeBSD|OpenBSD) cpu_family=`uname -m`; @@ -59,7 +64,7 @@ check_cpu () { ;; # Intel ia32 - *Xeon*) + *X[eE][oO][nN]*) # 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 @@ -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"; ;; @@ -120,7 +137,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 @@ -213,5 +237,5 @@ check_cpu () { rm __test.* } - + check_cpu diff --git a/BUILD/compile-alpha-cxx b/BUILD/compile-alpha-cxx index c49846fd964..1624f4ed622 100755 --- a/BUILD/compile-alpha-cxx +++ b/BUILD/compile-alpha-cxx @@ -1,7 +1,7 @@ /bin/rm -f */.deps/*.P */*.o make -k clean /bin/rm -f */.deps/*.P */*.o -/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache mysql-*.tar.gz +/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache mysql-*.tar.gz path=`dirname $0` . "$path/autorun.sh" diff --git a/BUILD/compile-alpha-debug b/BUILD/compile-alpha-debug index 113c2151461..b565a18272f 100755 --- a/BUILD/compile-alpha-debug +++ b/BUILD/compile-alpha-debug @@ -1,7 +1,7 @@ /bin/rm -f */.deps/*.P */*.o make -k clean /bin/rm -f */.deps/*.P */*.o -/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache mysql-*.tar.gz +/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache mysql-*.tar.gz path=`dirname $0` . "$path/autorun.sh" diff --git a/BUILD/compile-amd64-debug-max b/BUILD/compile-amd64-debug-max index 530bdba009b..f08e068135a 100755 --- a/BUILD/compile-amd64-debug-max +++ b/BUILD/compile-amd64-debug-max @@ -1,9 +1,7 @@ #! /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_flags="$amd64_cflags $debug_cflags" extra_configs="$amd64_configs $debug_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-debug-max-no-ndb b/BUILD/compile-amd64-debug-max-no-ndb new file mode 100755 index 00000000000..8babab44481 --- /dev/null +++ b/BUILD/compile-amd64-debug-max-no-ndb @@ -0,0 +1,7 @@ +#! /bin/sh +path=`dirname $0` +. "$path/SETUP.sh" +extra_flags="$amd64_cflags $debug_cflags" +extra_configs="$amd64_configs $debug_configs $max_no_ndb_configs" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-max b/BUILD/compile-amd64-max index 228448f6392..30db275c7ae 100755 --- a/BUILD/compile-amd64-max +++ b/BUILD/compile-amd64-max @@ -2,7 +2,7 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$amd64_cflags $fast_cflags $max_cflags -g" +extra_flags="$amd64_cflags $fast_cflags -g" extra_configs="$amd64_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max new file mode 100755 index 00000000000..962d0f17b04 --- /dev/null +++ b/BUILD/compile-amd64-valgrind-max @@ -0,0 +1,24 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$amd64_cflags $debug_cflags $valgrind_flags" +extra_configs="$amd64_configs $debug_configs $max_configs" + +. "$path/FINISH.sh" + +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. +******************************************************************************" +fi diff --git a/BUILD/compile-darwin-mwcc b/BUILD/compile-darwin-mwcc index 6fd0eab7e26..9ad8d5d40b5 100755 --- a/BUILD/compile-darwin-mwcc +++ b/BUILD/compile-darwin-mwcc @@ -31,14 +31,10 @@ else ;; 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_flags="$ppc_cflags $debug_cflags" extra_configs="$debug_configs $max_configs" ;; *) diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 613f2643c56..0504b308ceb 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -7,13 +7,14 @@ # package" that is used as the basis for all other binary builds. # test -f Makefile && make distclean +(cd storage/innobase && aclocal && autoheader && \ + libtoolize --automake --force --copy && \ + automake --force --add-missing --copy && autoconf) aclocal autoheader libtoolize --automake --force --copy automake --force --add-missing --copy autoconf -(cd bdb/dist && sh s_all) -(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) # Default to gcc for CC and CXX if test -z "$CXX" ; then @@ -45,9 +46,15 @@ fi # Make sure to enable all features that affect "make dist" ./configure \ --with-embedded-server \ - --with-berkeley-db \ + --with-archive-storage-engine \ + --with-blackhole-storage-engine \ + --with-csv-storage-engine \ + --with-example-storage-engine \ + --with-federated-storage-engine \ --with-innodb \ + --with-ssl \ --enable-thread-safe-client \ --with-extra-charsets=complex \ - --with-ndbcluster + --with-ndbcluster \ + --with-zlib-dir=bundled make diff --git a/BUILD/compile-ia64-debug-max b/BUILD/compile-ia64-debug-max index 5082844f088..d1017ad506b 100755 --- a/BUILD/compile-ia64-debug-max +++ b/BUILD/compile-ia64-debug-max @@ -1,5 +1,5 @@ gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache innobase/config.cache bdb/build_unix/config.cache +/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache path=`dirname $0` . "$path/autorun.sh" diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug index 7957caead29..db2bbea02f4 100755 --- a/BUILD/compile-pentium-debug +++ b/BUILD/compile-pentium-debug @@ -4,10 +4,6 @@ path=`dirname $0` . "$path/SETUP.sh" $@ --with-debug=full 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 " - -extra_configs="$extra_configs" +extra_configs="$pentium_configs $debug_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max index 7a11ad24c44..adb9b7899a5 100755 --- a/BUILD/compile-pentium-debug-max +++ b/BUILD/compile-pentium-debug-max @@ -1,11 +1,9 @@ #! /bin/sh path=`dirname $0` -. "$path/SETUP.sh" $@ --with-debug=full +. "$path/SETUP.sh" "$@" --with-debug=full -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_configs" +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs $max_configs $error_inject" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-max-no-embedded b/BUILD/compile-pentium-debug-max-no-embedded index dfdf7d0a5e1..2cae5eff694 100755 --- a/BUILD/compile-pentium-debug-max-no-embedded +++ b/BUILD/compile-pentium-debug-max-no-embedded @@ -3,9 +3,7 @@ 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 $base_max_configs" +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs $max_no_embedded_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb index 26ec7eacc9d..3a94e89439a 100755 --- a/BUILD/compile-pentium-debug-max-no-ndb +++ b/BUILD/compile-pentium-debug-max-no-ndb @@ -3,9 +3,7 @@ path=`dirname $0` . "$path/SETUP.sh" $@ --with-debug=full -extra_flags="$pentium_cflags $debug_cflags $max_cflags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_flags="$pentium_cflags $debug_cflags" extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-no-bdb b/BUILD/compile-pentium-debug-no-bdb deleted file mode 100755 index d7e70f868cc..00000000000 --- a/BUILD/compile-pentium-debug-no-bdb +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs --without-berkeley-db $static_link" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-openssl b/BUILD/compile-pentium-debug-openssl index 68d99b6eda6..2e24dbfd2f1 100755 --- a/BUILD/compile-pentium-debug-openssl +++ b/BUILD/compile-pentium-debug-openssl @@ -4,10 +4,8 @@ path=`dirname $0` . "$path/SETUP.sh" 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" -extra_configs="$extra_configs --with-debug=full --with-openssl" +extra_configs="$extra_configs --with-debug=full --with-ssl=/usr" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-yassl b/BUILD/compile-pentium-debug-yassl index 666e73d0267..61ad2937c4a 100755 --- a/BUILD/compile-pentium-debug-yassl +++ b/BUILD/compile-pentium-debug-yassl @@ -4,10 +4,8 @@ path=`dirname $0` . "$path/SETUP.sh" 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" -extra_configs="$extra_configs --with-debug=full --with-yassl" +extra_configs="$extra_configs --with-debug=full --with-ssl" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-gcov b/BUILD/compile-pentium-gcov index 26475824570..1a49b5f836a 100755 --- a/BUILD/compile-pentium-gcov +++ b/BUILD/compile-pentium-gcov @@ -1,12 +1,24 @@ #! /bin/sh +# Need to disable ccache, or we loose the gcov-needed compiler output files. + +CCACHE_GCOV_VERSION_ENABLED=0 +if ccache -V > /dev/null 2>&1 +then + CCACHE_VER=`ccache -V | head -1 | sed s/"ccache version "//` + if test "$CCACHE_VER" == "2.4-gcov" + then + CCACHE_GCOV_VERSION_ENABLED=1 + else + CCACHE_DISABLE=1 + export CCACHE_DISABLE + fi +fi +export CCACHE_GCOV_VERSION_ENABLED + path=`dirname $0` . "$path/SETUP.sh" -# Need to disable ccache, or we loose the gcov-needed compiler output files. -CCACHE_DISABLE=1 -export CCACHE_DISABLE - # GCC4 needs -fprofile-arcs -ftest-coverage on the linker command line (as well # as on the compiler command line), and this requires setting LDFLAGS for BDB. export LDFLAGS="-fprofile-arcs -ftest-coverage" @@ -14,10 +26,10 @@ export LDFLAGS="-fprofile-arcs -ftest-coverage" # The -fprofile-arcs and -ftest-coverage options cause GCC to instrument the # code with profiling information used by gcov. # the -DDISABLE_TAO_ASM is needed to avoid build failures in Yassl. -extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM $debug_cflags $max_cflags -DMYSQL_SERVER_SUFFIX=-gcov" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_flags="$pentium_cflags -fprofile-arcs -ftest-coverage -DDISABLE_TAO_ASM -DHAVE_MUTEX_THREAD_ONLY $debug_extra_flags $debug_cflags $max_cflags -DMYSQL_SERVER_SUFFIX=-gcov" extra_configs="$pentium_configs $debug_configs --disable-shared $static_link" extra_configs="$extra_configs $max_configs" +c_warnings="$c_warnings $debug_extra_warnings" +cxx_warnings="$cxx_warnings $debug_extra_warnings" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-icc-valgrind-max b/BUILD/compile-pentium-icc-valgrind-max index b765c777e2b..58acf892f5a 100755 --- a/BUILD/compile-pentium-icc-valgrind-max +++ b/BUILD/compile-pentium-icc-valgrind-max @@ -9,7 +9,7 @@ CC=icc CXX=icpc export CC CXX -extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max" +extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" # Disable following warnings as these are generated by header files: # 161 unrecognized pragma diff --git a/BUILD/compile-pentium-max b/BUILD/compile-pentium-max index 595581f604e..8272e3406d3 100755 --- a/BUILD/compile-pentium-max +++ b/BUILD/compile-pentium-max @@ -3,7 +3,7 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$pentium_cflags $fast_cflags $max_cflags -g" +extra_flags="$pentium_cflags $fast_cflags -g" extra_configs="$pentium_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-mysqlfs-debug b/BUILD/compile-pentium-mysqlfs-debug index 6643553d943..c871200604e 100755 --- a/BUILD/compile-pentium-mysqlfs-debug +++ b/BUILD/compile-pentium-mysqlfs-debug @@ -4,8 +4,6 @@ path=`dirname $0` . "$path/SETUP.sh" 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="$extra_configs --with-debug=full --with-mysqlfs --without-server --without-pstack" diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc index 639f108bb2b..411241451cf 100755 --- a/BUILD/compile-pentium-pgcc +++ b/BUILD/compile-pentium-pgcc @@ -2,7 +2,6 @@ AM_MAKEFLAGS="-j 2" gmake -k clean || true /bin/rm -f */.deps/*.P config.cache - path=`dirname $0` . "$path/autorun.sh" diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index f0dc92c2ffd..a2715e7c378 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -1,15 +1,10 @@ #! /bin/sh path=`dirname $0` -. "$path/SETUP.sh" +. "$path/SETUP.sh" "$@" -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" - -# We want to test isam when building with valgrind -extra_configs="$extra_configs $max_leave_isam_configs --with-isam" +extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" +extra_configs="$pentium_configs $debug_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64 b/BUILD/compile-pentium64 new file mode 100755 index 00000000000..e45528d3b45 --- /dev/null +++ b/BUILD/compile-pentium64 @@ -0,0 +1,13 @@ +#! /bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" $@ --with-debug=full + +extra_flags="$pentium64_cflags $fast_cflags" +c_warnings="$c_warnings" +cxx_warnings="$cxx_warnings" +extra_configs="$pentium_configs $static_link" + +extra_configs="$extra_configs " +CC="$CC --pipe" +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug index 0299669f79a..145d5c44f82 100755 --- a/BUILD/compile-pentium64-debug +++ b/BUILD/compile-pentium64-debug @@ -4,10 +4,8 @@ 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 " - +CC="$CC --pipe" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max index f0745c88c90..7b71237cb2f 100755 --- a/BUILD/compile-pentium64-debug-max +++ b/BUILD/compile-pentium64-debug-max @@ -3,11 +3,9 @@ path=`dirname $0` . "$path/SETUP.sh" $@ --with-debug=full -extra_flags="$pentium64_cflags $debug_cflags $max_cflags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" +extra_flags="$pentium64_cflags $debug_cflags" extra_configs="$pentium_configs $debug_configs $max_configs" extra_configs="$extra_configs " - +CC="$CC --pipe" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max index ef932920130..fa476cbb50a 100755 --- a/BUILD/compile-pentium64-valgrind-max +++ b/BUILD/compile-pentium64-valgrind-max @@ -3,13 +3,8 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$pentium64_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" - -# We want to test isam when building with valgrind -extra_configs="$extra_configs $max_leave_isam_configs --with-isam" +extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags" +extra_configs="$pentium_configs $debug_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-debug b/BUILD/compile-ppc-debug index 2be11eaaf22..99e9364a5e2 100755 --- a/BUILD/compile-ppc-debug +++ b/BUILD/compile-ppc-debug @@ -4,8 +4,6 @@ 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" diff --git a/BUILD/compile-ppc-debug-max b/BUILD/compile-ppc-debug-max index 49d1442fd45..7c1a593869f 100755 --- a/BUILD/compile-ppc-debug-max +++ b/BUILD/compile-ppc-debug-max @@ -3,9 +3,7 @@ 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_flags="$ppc_cflags $debug_cflags" extra_configs="$debug_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-debug-max-no-ndb b/BUILD/compile-ppc-debug-max-no-ndb index a5b922a1ec9..7b39aa25dff 100755 --- a/BUILD/compile-ppc-debug-max-no-ndb +++ b/BUILD/compile-ppc-debug-max-no-ndb @@ -3,9 +3,7 @@ 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_flags="$ppc_cflags $debug_cflags" extra_configs="$debug_configs $max_no_ndb_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-ppc-max b/BUILD/compile-ppc-max index 1d89be81c9c..c2eb95dffea 100755 --- a/BUILD/compile-ppc-max +++ b/BUILD/compile-ppc-max @@ -3,7 +3,7 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$ppc_cflags $fast_cflags $max_cflags -g" +extra_flags="$ppc_cflags $fast_cflags -g" extra_configs="$extra_configs $max_configs" . "$path/FINISH.sh" diff --git a/BUILD/compile-sap b/BUILD/compile-sap deleted file mode 100755 index 376afaf6f56..00000000000 --- a/BUILD/compile-sap +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags" -extra_configs="$pentium_configs --without-berkeley-db" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-sap-debug b/BUILD/compile-sap-debug deleted file mode 100755 index d7e70f868cc..00000000000 --- a/BUILD/compile-sap-debug +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -path=`dirname $0` -. "$path/SETUP.sh" - -extra_flags="$pentium_cflags $debug_cflags" -extra_configs="$pentium_configs $debug_configs --without-berkeley-db $static_link" - -. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc index 0c05bf8a101..db46fc4db27 100755 --- a/BUILD/compile-solaris-sparc +++ b/BUILD/compile-solaris-sparc @@ -1,11 +1,7 @@ -#! /bin/sh - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - +#!/usr/bin/bash path=`dirname $0` -. "$path/autorun.sh" - -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client +. "$path/SETUP.sh" +extra_flags="" +extra_configs="$max_configs" -gmake -j 4 +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug index 3384b623ccb..e92f7fecc84 100755 --- a/BUILD/compile-solaris-sparc-debug +++ b/BUILD/compile-solaris-sparc-debug @@ -1,11 +1,7 @@ -#! /bin/sh - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - +#!/usr/bin/bash path=`dirname $0` -. "$path/autorun.sh" - -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug +. "$path/SETUP.sh" +extra_flags="$debug_cflags" +extra_configs="$debug_configs $max_configs" -gmake -j 4 +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify index 29cf5671432..8c24b0db98c 100755 --- a/BUILD/compile-solaris-sparc-purify +++ b/BUILD/compile-solaris-sparc-purify @@ -37,7 +37,7 @@ gmake -k clean || true path=`dirname $0` . "$path/autorun.sh" -CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS +CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS gmake -j 4 diff --git a/BUILD/test-alpha-ccc b/BUILD/test-alpha-ccc deleted file mode 100755 index c6f4abc0973..00000000000 --- a/BUILD/test-alpha-ccc +++ /dev/null @@ -1,11 +0,0 @@ -cd /usr/local/mysql -bin/mysqladmin shutdown -libexec/mysqld --basedir . & -cd sql-bench -rm output/* -perl run-all-tests --comment "Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; egcs 1.1.2 + ccc" --user=monty --password="ds20-gryta" -perl run-all-tests --comment "Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; egcs 1.1.2 + ccc" --user=monty --password="ds20-gryta" --log --use-old -mv output/* output-ccc -perl run-all-tests --comment "Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; egcs 1.1.2 + ccc" --user=monty --password="ds20-gryta" --fast -perl run-all-tests --comment "Alpha DS20 2x500 MHz, 2G memory, key_buffer=16M; egcs 1.1.2 + ccc" --user=monty --password="ds20-gryta" --log --use-old --fast -mv output/* output-ccc |