mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
b125770aaa
Consequently, rename HAVE_purify to HAVE_valgrind, and related changes. Leave some comments about purify when not clear that they apply also to Valgrind. Fix redundant IF_VALGRIND declaration. Misc. small fixes: - Fixes for pool-of-threads patch. - Fixes for push of PBXT storage engine. - mysql-test-run.pl fix. - Fix build problem in compile-pentium64-max. BUILD/SETUP.sh: Rename purify -> valgrind. BUILD/build_mccge.sh: Rename purify -> valgrind. BUILD/compile-dist: Fix that PBXT was missing in source tarball after `BUILD/compile-dist && make dist` BUILD/compile-pentium64-max: Fix a build problem with BUILD/compile-pentium64-max on CentOS/Fedora Core 10 amd64. On these systems, there is libz.so but no libz.a. Finding libz.so, ./configure decides to use system zlib. But since BUILD/compile-pentium64-max builds a fully static binary with -all-static, the link of mysqld fails due to missing libz.a. Fix by using bundled zlib in the build script. BUILD/compile-solaris-sparc-purify: Rename purify -> valgrind. include/m_string.h: Rename purify -> valgrind. include/my_global.h: Rename purify -> valgrind. mysql-test/Makefile.am: Fix that PBXT test suite was missing from `make dist` source tarball. mysql-test/lib/mtr_unique.pm: Better fix to avoid races when chmod'ing the semaphore file. (Though using chmod 666 shared files in /tmp/ is still not a very good solution). mysql-test/t/pool_of_threads.cnf: Fix that test case pool_of_threads fails if run on mysqld with no --with-libevent support. mysys/mf_qsort.c: Rename purify -> valgrind. mysys/my_alloc.c: Rename purify -> valgrind. mysys/my_init.c: Rename purify -> valgrind. mysys/my_rnd.c: Rename purify -> valgrind. mysys/safemalloc.c: Rename purify -> valgrind. scripts/mysql_config.pl.in: Rename purify -> valgrind. scripts/mysql_config.sh: Rename purify -> valgrind. sql/field_conv.cc: Rename purify -> valgrind. sql/filesort.cc: Rename purify -> valgrind. sql/ha_partition.cc: Rename purify -> valgrind. sql/hostname.cc: Rename purify -> valgrind. sql/item_timefunc.cc: Rename purify -> valgrind. sql/log_event.cc: Rename purify -> valgrind. sql/log_event_old.cc: Rename purify -> valgrind. sql/my_decimal.h: Rename purify -> valgrind. sql/mysqld.cc: Rename purify -> valgrind. Fix redundant IF_VALGRIND declaration. sql/opt_range.cc: Rename purify -> valgrind. sql/opt_range.h: Rename purify -> valgrind. sql/records.cc: Rename purify -> valgrind. sql/rpl_rli.cc: Rename purify -> valgrind. sql/rpl_rli.h: Rename purify -> valgrind. sql/set_var.cc: Fix missing static declaration on pool_of_threads. sql/slave.cc: Rename purify -> valgrind. sql/sql_base.cc: Rename purify -> valgrind. sql/sql_binlog.cc: Rename purify -> valgrind. sql/sql_class.cc: Rename purify -> valgrind. sql/sql_list.h: Rename purify -> valgrind. sql/sql_load.cc: Rename purify -> valgrind. sql/sql_select.cc: Rename purify -> valgrind. sql/table.cc: Rename purify -> valgrind. storage/archive/azio.c: Rename purify -> valgrind. storage/innobase/buf/buf0buf.c: Rename purify -> valgrind. storage/innobase/include/univ.i: Rename purify -> valgrind. storage/innobase/srv/srv0start.c: Rename purify -> valgrind. storage/maria/ha_maria.cc: Rename purify -> valgrind. storage/maria/ma_blockrec.c: Rename purify -> valgrind. storage/maria/ma_check.c: Rename purify -> valgrind. storage/maria/ma_loghandler.c: Rename purify -> valgrind. storage/maria/ma_packrec.c: Rename purify -> valgrind. storage/maria/ma_page.c: Rename purify -> valgrind. storage/maria/ma_pagecrc.c: Rename purify -> valgrind. storage/maria/ma_search.c: Rename purify -> valgrind. storage/myisam/mi_check.c: Rename purify -> valgrind. storage/myisam/mi_page.c: Rename purify -> valgrind. storage/myisam/mi_search.c: Rename purify -> valgrind. storage/myisammrg/ha_myisammrg.cc: Rename purify -> valgrind. strings/bcmp.c: Rename purify -> valgrind. strings/decimal.c: Rename purify -> valgrind. strings/strmake.c: Rename purify -> valgrind.
110 lines
3.4 KiB
Bash
Executable file
110 lines
3.4 KiB
Bash
Executable file
#! /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 ;;
|
|
--purify) mode=purify ;;
|
|
--purecov*) mode=purecov ;;
|
|
--quantify) mode=quantify ;;
|
|
--cxxfilt) shift ; cxxfilt=$1 ;;
|
|
-h | --help )
|
|
echo "Usage: $0 [ options ]"
|
|
echo "Where the 'options' are"
|
|
echo " --help | -h Display this help"
|
|
echo " --debug Compile with DBUG enabled"
|
|
echo " --purify Only prepare for Purify"
|
|
echo " --purecov Only prepare for PureCover"
|
|
echo " --quantify Only prepare for Quantify"
|
|
echo " --cxxfilt <cxxfilt> Path to cxxfilt/c++filt program"
|
|
echo " This program is needed for gcc 3.X"
|
|
exit 0 ;;
|
|
*) echo "No such option '$1'" ; exit 1 ;;
|
|
esac
|
|
shift
|
|
done
|
|
|
|
make -k maintainer-clean || true
|
|
/bin/rm -f */.deps/*.P config.cache
|
|
|
|
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_valgrind -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_valgrind -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
|
|
|
|
make -j 4
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
#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
|
|
make CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target
|
|
mv $binary $binary-purify
|
|
fi
|
|
|
|
if [ -n "$mode" -a $mode = quantify ] ; then
|
|
make CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target
|
|
mv $binary $binary-quantify
|
|
fi
|
|
|
|
if [ -n "$mode" -a $mode = purecov ] ; then
|
|
make 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
|
|
|
|
# ----------------------------------------------------------------------
|
|
|