summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-08-22 11:51:03 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-08-22 11:51:03 -0600
commitc34e2c7f13f15929a2260835dbc3cd09aa440652 (patch)
tree8420ade46c2c12aaf7c27efafb3179dac8e886d8 /BUILD
parent7dd4e789586bef5141e1a1d4da4b7efc271708aa (diff)
parent6f052e87bf1dae1b04417f9508d398970c565b2b (diff)
downloadmariadb-git-c34e2c7f13f15929a2260835dbc3cd09aa440652.tar.gz
Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-runtime
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge BUILD/SETUP.sh: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/t/query_cache.test: Auto merged sql/item_cmpfunc.h: Auto merged
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh25
-rwxr-xr-xBUILD/compile-amd64-gcov17
-rwxr-xr-xBUILD/compile-amd64-gprof9
-rwxr-xr-xBUILD/compile-pentium-gprof4
-rwxr-xr-xBUILD/compile-pentium64-gcov17
-rwxr-xr-xBUILD/compile-pentium64-gprof9
6 files changed, 79 insertions, 2 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 6b3708f475f..19642e3754a 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -207,3 +207,28 @@ then
echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
fi
+
+# gcov
+
+# 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.
+# The -DHAVE_gcov enables code to write out coverage info even when crashing.
+
+gcov_compile_flags="-fprofile-arcs -ftest-coverage"
+gcov_compile_flags="$gcov_compile_flags -DDISABLE_TAO_ASM"
+gcov_compile_flags="$gcov_compile_flags -DMYSQL_SERVER_SUFFIX=-gcov -DHAVE_gcov"
+
+# 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.
+
+gcov_link_flags="-fprofile-arcs -ftest-coverage"
+
+gcov_configs="--disable-shared $static_link"
+
+# gprof
+
+gprof_compile_flags="-O2 -pg -g"
+
+gprof_link_flags="--disable-shared $static_link"
+
diff --git a/BUILD/compile-amd64-gcov b/BUILD/compile-amd64-gcov
new file mode 100755
index 00000000000..239a4aed0fb
--- /dev/null
+++ b/BUILD/compile-amd64-gcov
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+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
+
+export LDFLAGS="$gcov_link_flags"
+
+extra_flags="$amd64_cflags $debug_cflags $max_cflags $gcov_compile_flags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$amd64_configs $debug_configs $gcov_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-amd64-gprof b/BUILD/compile-amd64-gprof
new file mode 100755
index 00000000000..6cfb8a4302c
--- /dev/null
+++ b/BUILD/compile-amd64-gprof
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$amd64_cflags $gprof_compile_flags"
+extra_configs="$amd64_configs $debug_configs $gprof_link_flags"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-gprof b/BUILD/compile-pentium-gprof
index aa74de0b1b2..4aebc1d2e02 100755
--- a/BUILD/compile-pentium-gprof
+++ b/BUILD/compile-pentium-gprof
@@ -3,7 +3,7 @@
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags -O2 -pg -g"
-extra_configs="$pentium_configs $debug_configs --disable-shared $static_link"
+extra_flags="$pentium_cflags $gprof_compile_flags"
+extra_configs="$pentium_configs $debug_configs $gprof_link_flags"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov
new file mode 100755
index 00000000000..5a99b7f8796
--- /dev/null
+++ b/BUILD/compile-pentium64-gcov
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+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
+
+export LDFLAGS="$gcov_link_flags"
+
+extra_flags="$pentium64_cflags $debug_cflags $max_cflags $gcov_compile_flags"
+c_warnings="$c_warnings $debug_extra_warnings"
+cxx_warnings="$cxx_warnings $debug_extra_warnings"
+extra_configs="$pentium64_configs $debug_configs $gcov_configs $max_configs"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium64-gprof b/BUILD/compile-pentium64-gprof
new file mode 100755
index 00000000000..f64dee6d196
--- /dev/null
+++ b/BUILD/compile-pentium64-gprof
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium64_cflags $gprof_compile_flags"
+extra_configs="$pentium64_configs $debug_configs $gprof_link_flags"
+
+. "$path/FINISH.sh"