summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-08-12 17:55:27 +0400
committerAlexander Nozdrin <alik@sun.com>2010-08-12 17:55:27 +0400
commit92814d6d276b2967674806967b19cf154ca413b9 (patch)
treea254f9f9ffa921f69300021067e8228b68597d29 /BUILD
parent5f18951577bb88b4e2180a2742acf971f9fdc572 (diff)
parentad264fa28700a0ed838ab762f861dc3b8b60eadd (diff)
downloadmariadb-git-92814d6d276b2967674806967b19cf154ca413b9.tar.gz
Auto-merge from mysql-5.5-bugfixing.
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/Makefile.am1
-rwxr-xr-xBUILD/SETUP.sh12
-rwxr-xr-xBUILD/build_mccge.sh18
-rwxr-xr-xBUILD/check-cpu146
-rwxr-xr-xBUILD/compile-ndb-autotest12
-rwxr-xr-xBUILD/compile-pentium-debug1
-rwxr-xr-xBUILD/compile-pentium-debug-max1
-rwxr-xr-xBUILD/compile-pentium-debug-max-no-ndb1
-rwxr-xr-xBUILD/compile-pentium-debug-openssl2
-rwxr-xr-xBUILD/compile-pentium-debug-yassl2
-rwxr-xr-xBUILD/compile-pentium-mysqlfs-debug11
-rwxr-xr-xBUILD/compile-pentium64-debug1
-rwxr-xr-xBUILD/compile-pentium64-debug-max1
13 files changed, 82 insertions, 127 deletions
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am
index c5732d43fbf..56c86e7a80c 100644
--- a/BUILD/Makefile.am
+++ b/BUILD/Makefile.am
@@ -52,7 +52,6 @@ EXTRA_DIST = FINISH.sh \
compile-pentium-icc-yassl \
compile-pentium-max \
compile-pentium-myodbc \
- compile-pentium-mysqlfs-debug \
compile-pentium-pgcc \
compile-pentium-valgrind-max \
compile-pentium64 \
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index afb8eca08f2..a23a801e7e0 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -14,7 +14,6 @@ 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|maintainer]
Influences the debug flags. Old is default.
--prefix=path Build with prefix 'path'.
@@ -30,8 +29,6 @@ parse_options()
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)
@@ -60,7 +57,6 @@ fi
prefix="/usr/local/mysql"
just_print=
just_configure=
-full_debug=
warning_mode=
maintainer_mode=
@@ -116,7 +112,6 @@ else
cxx_warnings="$warnings -Wno-unused-parameter"
# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo"
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
-# Added unless --with-debug=full
debug_extra_cflags="-O0 -g3 -gdwarf-2"
fi
@@ -141,11 +136,8 @@ base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
# Be as fast as we can be without losing our ability to backtrace.
fast_cflags="-O3 -fno-omit-frame-pointer"
-debug_configs="--with-debug$full_debug"
-if [ -z "$full_debug" ]
-then
- debug_cflags="$debug_cflags $debug_extra_cflags"
-fi
+debug_configs="--with-debug"
+debug_cflags="$debug_cflags $debug_extra_cflags"
#
# Configuration options.
diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh
index aae017aa54d..cb70a8cef67 100755
--- a/BUILD/build_mccge.sh
+++ b/BUILD/build_mccge.sh
@@ -148,7 +148,6 @@ Usage: $0 [options]
--extended-help Show extended help message
--without-debug Build non-debug version
--with-debug Build debug version
- --with-debug=full Build with full debug.
--configure-only Stop after running configure.
--use-autotools Start by running autoconf, automake,.. tools
--no-autotools Start from configure
@@ -262,10 +261,6 @@ extended_usage()
This flag prevents the use of GPL libraries which cannot be used
under a commercial license, such as the readline library.
- --with-debug[=full]
- This option will ensure that the version is built with debug
- information enabled; the optimisation level is decreased to -O.
-
--developer
This option changes a number of things to make the version built
more appropriate to the debugging and testing needs of developers.
@@ -658,11 +653,6 @@ parse_options()
--datadir=*)
datadir=`get_key_value "$1"`
;;
- --with-debug=full)
- full_debug="=full"
- with_debug_flag="yes"
- fast_flag="no"
- ;;
--without-debug)
with_debug_flag="no"
if test "x$fast_flag" != "xyes" ; then
@@ -1044,10 +1034,7 @@ set_warning_flags()
# C++ warnings
cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder"
cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
-# Added unless --with-debug=full
- if test "x$full_debug" = "x" ; then
- compiler_flags="$compiler_flags -Wuninitialized"
- fi
+ compiler_flags="$compiler_flags -Wuninitialized"
elif test "x$warning_mode" = "xpedantic" ; then
warnings="-W -Wall -ansi -pedantic -Wno-long-long -D_POSIX_SOURCE"
c_warnings="$warnings"
@@ -1113,7 +1100,7 @@ set_base_configs()
base_configs="$base_configs --localstatedir=$datadir"
fi
if test "x$with_debug_flag" = "xyes" ; then
- base_configs="$base_configs --with-debug$full_debug"
+ base_configs="$base_configs --with-debug"
fi
base_configs="$base_configs --enable-local-infile"
base_configs="$base_configs --enable-thread-safe-client"
@@ -1546,7 +1533,6 @@ gpl="yes"
version_text=
developer_flag="no"
just_configure=
-full_debug=
warning_mode=
with_flags=
error_inject_flag=
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index f9f5d423f4f..585043de67c 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -7,6 +7,79 @@
# check_cpu_args : Arguments for GCC compiler settings
#
+check_compiler_cpu_flags () {
+ # different compiler versions have different option names
+ # for CPU specific command line options
+ if test -z "$CC" ; then
+ cc="gcc";
+ else
+ cc=$CC
+ fi
+
+ # check if compiler is gcc and dump its version
+ cc_verno=`$cc -dumpversion 2>/dev/null`
+ if test "x$?" = "x0" ; then
+ set -- `echo $cc_verno | tr '.' ' '`
+ cc_ver="GCC"
+ cc_major=$1
+ cc_minor=$2
+ cc_patch=$3
+ cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
+ fi
+
+ case "$cc_ver--$cc_verno" in
+ *GCC*)
+ # different gcc backends (and versions) have different CPU flags
+ case `gcc -dumpmachine` in
+ i?86-* | x86_64-*)
+ if test "$cc_comp" -lt 304 ; then
+ check_cpu_cflags="-mcpu=${cpu_arg}"
+ elif test "$cc_comp" -ge 402 ; then
+ check_cpu_cflags="-mtune=native"
+ else
+ check_cpu_cflags="-mtune=${cpu_arg}"
+ fi
+ ;;
+ ppc-*)
+ check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}"
+ ;;
+ *)
+ check_cpu_cflags=""
+ return
+ ;;
+ esac
+ ;;
+ 2.95.*)
+ # GCC 2.95 doesn't expose its name in --version output
+ check_cpu_cflags="-m${cpu_arg}"
+ ;;
+ *)
+ check_cpu_cflags=""
+ return
+ ;;
+ esac
+
+ # now we check whether the compiler really understands the cpu type
+ touch __test.c
+
+ while [ "$cpu_arg" ] ; do
+ printf "testing $cpu_arg ... " >&2
+
+ # compile check
+ eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null
+ if test "x$?" = "x0" ; then
+ echo ok >&2
+ break;
+ fi
+
+ echo failed >&2
+ check_cpu_cflags=""
+ break;
+ done
+ rm __test.*
+ return 0
+}
+
check_cpu () {
CPUINFO=/proc/cpuinfo
if test -n "$TEST_CPUINFO" ; then
@@ -179,83 +252,14 @@ check_cpu () {
return
fi
- # different compiler versions have different option names
- # for CPU specific command line options
- if test -z "$CC" ; then
- cc="gcc";
- else
- cc=$CC
+ if test "x$compiler" = "x" ; then
+ check_compiler_cpu_flags
fi
if test "x$core2" = "xyes" ; then
cpu_arg="core2"
fi
- if test "x$compiler" != "x" ; then
- return 0
- fi
-
- # check if compiler is gcc and dump its version
- cc_verno=`$cc -dumpversion 2>/dev/null`
- if test "x$?" = "x0" ; then
- set -- `echo $cc_verno | tr '.' ' '`
- cc_ver="GCC"
- cc_major=$1
- cc_minor=$2
- cc_patch=$3
- cc_comp=`expr $cc_major '*' 100 '+' $cc_minor`
- fi
-
- case "$cc_ver--$cc_verno" in
- *GCC*)
- # different gcc backends (and versions) have different CPU flags
- case `gcc -dumpmachine` in
- i?86-* | x86_64-*)
- if test "$cc_comp" -lt 304 ; then
- check_cpu_cflags="-mcpu=${cpu_arg}"
- elif test "$cc_comp" -ge 402 ; then
- check_cpu_cflags="-mtune=native"
- else
- check_cpu_cflags="-mtune=${cpu_arg}"
- fi
- ;;
- ppc-*)
- check_cpu_cflags="-mcpu=${cpu_arg} -mtune=${cpu_arg}"
- ;;
- *)
- check_cpu_cflags=""
- return
- ;;
- esac
- ;;
- 2.95.*)
- # GCC 2.95 doesn't expose its name in --version output
- check_cpu_cflags="-m${cpu_arg}"
- ;;
- *)
- check_cpu_cflags=""
- return
- ;;
- esac
-
- # now we check whether the compiler really understands the cpu type
- touch __test.c
-
- while [ "$cpu_arg" ] ; do
- printf "testing $cpu_arg ... " >&2
-
- # compile check
- eval "$cc -c $check_cpu_cflags __test.c" 2>/dev/null
- if test "x$?" = "x0" ; then
- echo ok >&2
- break;
- fi
-
- echo failed >&2
- check_cpu_cflags=""
- break;
- done
- rm __test.*
return 0
}
diff --git a/BUILD/compile-ndb-autotest b/BUILD/compile-ndb-autotest
index be28cc28346..6f86eeb7464 100755
--- a/BUILD/compile-ndb-autotest
+++ b/BUILD/compile-ndb-autotest
@@ -4,16 +4,6 @@ path=`dirname $0`
. "$path/SETUP.sh"
extra_configs="$max_configs --with-ndb-test --with-ndb-ccflags='-DERROR_INSERT'"
-if [ "$full_debug" ]
-then
- extra_flags="$debug_cflags"
- c_warnings="$c_warnings $debug_extra_warnings"
- cxx_warnings="$cxx_warnings $debug_extra_warnings"
- extra_configs="$debug_configs $extra_configs"
-else
- extra_flags="$fast_cflags"
-fi
-
-extra_flags="$extra_flags $max_cflags -g"
+extra_flags="$fast_cflags $max_cflags -g"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug b/BUILD/compile-pentium-debug
index 3f4027c5dd6..37381cc47df 100755
--- a/BUILD/compile-pentium-debug
+++ b/BUILD/compile-pentium-debug
@@ -1,7 +1,6 @@
#! /bin/sh
path=`dirname $0`
-set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
diff --git a/BUILD/compile-pentium-debug-max b/BUILD/compile-pentium-debug-max
index 941a63a209f..5c56ceb37ba 100755
--- a/BUILD/compile-pentium-debug-max
+++ b/BUILD/compile-pentium-debug-max
@@ -1,7 +1,6 @@
#! /bin/sh
path=`dirname $0`
-set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
diff --git a/BUILD/compile-pentium-debug-max-no-ndb b/BUILD/compile-pentium-debug-max-no-ndb
index 3f7a7904050..f1e14b73ecd 100755
--- a/BUILD/compile-pentium-debug-max-no-ndb
+++ b/BUILD/compile-pentium-debug-max-no-ndb
@@ -1,7 +1,6 @@
#! /bin/sh
path=`dirname $0`
-set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags"
diff --git a/BUILD/compile-pentium-debug-openssl b/BUILD/compile-pentium-debug-openssl
index 2e24dbfd2f1..7026e0fde05 100755
--- a/BUILD/compile-pentium-debug-openssl
+++ b/BUILD/compile-pentium-debug-openssl
@@ -6,6 +6,6 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
-extra_configs="$extra_configs --with-debug=full --with-ssl=/usr"
+extra_configs="$extra_configs --with-debug --with-ssl=/usr"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-debug-yassl b/BUILD/compile-pentium-debug-yassl
index 61ad2937c4a..3f9a36ce5a1 100755
--- a/BUILD/compile-pentium-debug-yassl
+++ b/BUILD/compile-pentium-debug-yassl
@@ -6,6 +6,6 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags"
extra_configs="$pentium_configs $debug_configs"
-extra_configs="$extra_configs --with-debug=full --with-ssl"
+extra_configs="$extra_configs --with-debug --with-ssl"
. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium-mysqlfs-debug b/BUILD/compile-pentium-mysqlfs-debug
deleted file mode 100755
index c871200604e..00000000000
--- a/BUILD/compile-pentium-mysqlfs-debug
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-path=`dirname $0`
-. "$path/SETUP.sh"
-
-extra_flags="$pentium_cflags $debug_cflags"
-extra_configs="$pentium_configs $debug_configs $static_link"
-
-extra_configs="$extra_configs --with-debug=full --with-mysqlfs --without-server --without-pstack"
-
-. "$path/FINISH.sh"
diff --git a/BUILD/compile-pentium64-debug b/BUILD/compile-pentium64-debug
index 06ee672789c..7d11ee9df76 100755
--- a/BUILD/compile-pentium64-debug
+++ b/BUILD/compile-pentium64-debug
@@ -1,7 +1,6 @@
#! /bin/sh
path=`dirname $0`
-set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags"
diff --git a/BUILD/compile-pentium64-debug-max b/BUILD/compile-pentium64-debug-max
index b8b271688be..322b232a20c 100755
--- a/BUILD/compile-pentium64-debug-max
+++ b/BUILD/compile-pentium64-debug-max
@@ -1,7 +1,6 @@
#! /bin/sh
path=`dirname $0`
-set -- "$@" --with-debug=full
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $debug_cflags"