summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh33
-rwxr-xr-xBUILD/build_mccge.sh224
-rwxr-xr-xBUILD/check-cpu16
-rwxr-xr-xBUILD/compile-alpha-debug17
-rwxr-xr-xBUILD/compile-dist18
-rwxr-xr-xBUILD/compile-pentium-pgcc17
-rwxr-xr-xBUILD/compile-pentium6422
-rwxr-xr-xBUILD/compile-solaris-amd64-forte2
-rwxr-xr-xBUILD/compile-solaris-amd64-forte-debug31
-rwxr-xr-xBUILD/compile-solaris-sparc17
-rwxr-xr-xBUILD/compile-solaris-sparc-debug17
-rwxr-xr-xBUILD/compile-solaris-sparc-purify17
12 files changed, 123 insertions, 308 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index e5a8255c428..6c45c23587f 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -16,7 +16,6 @@
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
# MA 02111-1307, USA
-
########################################################################
get_key_value()
@@ -130,7 +129,7 @@ elif [ "x$warning_mode" = "xmaintainer" ]; then
debug_extra_cflags="-g3"
else
# Both C and C++ warnings
- warnings="-Wall -Wextra -Wunused -Wwrite-strings"
+ warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
@@ -149,13 +148,14 @@ fi
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
# LINT_INIT(), which is only useful for silencing spurious warnings
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
-valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify -DHAVE_valgrind "
+valgrind_flags="-DHAVE_valgrind -DHAVE_purify -USAFEMALLOC"
+valgrind_flags="$valgrind_flags -UFORCE_INIT_OF_VARS -Wno-uninitialized"
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
valgrind_configs="--with-valgrind"
#
# Used in -debug builds
-debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
-debug_cflags="$debug_cflags -DSAFE_MUTEX"
+debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG"
+debug_cflags="$debug_cflags -DSAFE_MUTEX -DSAFEMALLOC"
error_inject="--with-error-inject "
#
# Base C++ flags for all builds
@@ -171,9 +171,6 @@ then
debug_cflags="$debug_cflags $debug_extra_cflags"
fi
-
-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
@@ -187,8 +184,6 @@ base_configs="$base_configs --with-extra-charsets=complex "
base_configs="$base_configs --enable-thread-safe-client "
base_configs="$base_configs --with-big-tables $maintainer_mode"
base_configs="$base_configs --with-plugin-aria --with-aria-tmp-tables"
-# Compile our client programs with static libraries to allow them to be moved
-base_configs="$base_configs --with-mysqld-ldflags=-static --with-client-ldflags=-static"
if test -d "$path/../cmd-line-utils/readline"
then
@@ -230,6 +225,24 @@ if test -z "$CXX" ; then
CXX=g++
fi
+
+#
+# Set -Wuninitialized to debug flags for gcc 4.4 and above
+# because it is allowed there without -O
+#
+if test `$CC -v 2>&1 | tail -1 | sed 's/ .*$//'` = 'gcc' ; then
+ GCCVERSION=`$CC -v 2>&1 | tail -1 | \
+ sed 's/^[a-zA-Z][a-zA-Z]* [a-zA-Z][a-zA-Z]* //' | sed 's/ .*$//'`
+ GCCV1=`echo $GCCVERSION | sed 's/\..*$//'`
+ GCCV2=`echo $GCCVERSION | sed 's/[0-9][0-9]*\.//'|sed 's/\..*$//'`
+ if test '(' "$GCCV1" -gt '4' ')' -o \
+ '(' '(' "$GCCV1" -eq '4' ')' -a '(' "$GCCV2" -ge '4' ')' ')'
+ then
+ debug_cflags="$debug_cflags -DFORCE_INIT_OF_VARS -Wuninitialized"
+ fi
+fi
+
+
# If ccache (a compiler cache which reduces build time)
# (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected
diff --git a/BUILD/build_mccge.sh b/BUILD/build_mccge.sh
index 9791ac04f22..057e21ad02f 100755
--- a/BUILD/build_mccge.sh
+++ b/BUILD/build_mccge.sh
@@ -1,6 +1,7 @@
#!/bin/sh
-# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2010, Oracle.
+# Copyright (c) 2009-2011 Monty Program Ab
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
@@ -30,23 +31,18 @@ get_key_value()
developer_usage()
{
cat <<EOF
-
- This script can be used by developers of MySQL, early adopters wanting
- to try out early versions of MySQL before binary versions are
- available, anyone needing a version with a special patch included that
- needs to be built from source code, or anyone else wanting to exercise
- full control over the MySQL build process.
-
- This help text is targeted towards those that want to debug and test
- MySQL using source code releases. If you have downloaded a source code
- release and simply want to build a usable binary, you should read the
+ This script can be used by developers of MariaDB wanting to try out
+ early versions before binary versions are available, anyone needing
+ a version with a special patch included that needs to be built from
+ source code, or anyone else wanting to exercise full control over
+ the build process.
+
+ This help text is targeted towards those that want to debug and test
+ source code releases. If you have downloaded a source code release
+ and simply want to build a usable binary, you should read the
--sysadmin-help instead.
- The script is also designed to be used by anyone receiving a source
- code release of MySQL Cluster Carrier Grade Edition. The default
- behaviour is to build the standard MySQL Cluster Carrier Grade Edition
- package. Three environment variables can be used to change the
- default behaviour:
+ Three environment variables can be used to define the default behaviour:
MYSQL_DEVELOPER
Defining this variable is similar to setting the --developer flag
@@ -57,9 +53,6 @@ cat <<EOF
Defining this variable sets the --with-debug flag
Options used with this script always override any default behaviour.
- The default package is MySQL Cluster Carrier Grade (standard) Edition.
- For developers, the default package is MySQL Cluster Carrier Grade
- Extended Edition.
More information for developers can be found in --help,
--sysadmin-help, and --extended-help.
@@ -77,17 +70,12 @@ sysadmin_usage()
{
cat <<EOF
- This script can be used to build MySQL Cluster Carrier Grade Edition
- based on a source code release you received from MySQL. It can also
- be used to build many variants other variants of MySQL, in particular
- various performance-optimised versions of MySQL.
-
It is assumed that you are building on a computer which is of the
- same type as that on which you intend to run MySQL/MySQL Cluster.
+ same type as that on which you intend to run the program.
The simplest possible way to run this script is to allow it to use the
built-in defaults everywhere, invoking it simply as (from top-level
- MySQL directory):
+ MariaDB source directory):
shell> BUILD/build_mccge.sh
@@ -99,21 +87,15 @@ cat <<EOF
with GCC, and x86 + SPARC for Solaris using the Forte compiler and
finally x86 on Linux using the Intel compiler.
3) Invokes the GCC compiler.
- 4) Builds a set of MySQL/MySQL Cluster binaries; for
- more information about these, see --extended-help.
+ 4) Builds a set of of binaries ; for more information about these,
+ see --extended-help.
5) Default compiler is always gcc.
The default version assumes that you have a source code tarball from
which you are building, and thus autoconf and automake do not need to
- be run. If you have downloaded a BitKeeper tree then you should read
+ be run. If you have downloaded a launchpad tree then you should read
--developer-help.
- If you are building MySQL/MySQL Cluster for commercial
- use then you need to set the --commercial flag to ensure that the
- commercial libraries are compiled in, rather than the GPL-only
- libraries. The default is to build a GPL version of MySQL Cluster
- Carrier Grade Edition.
-
If your building on a Solaris SPARC machine and you want to compile
using SunStudio you must set
--compiler=forte; if you want to build using the Intel compiler on
@@ -133,20 +115,16 @@ cat <<EOF
want the binaries installed.
Using a data directory other than the default (PREFIX/data) can be
- done when starting the MySQL Server, or by invoking this script with
+ done when starting the server, or by invoking this script with
the --datadir option.
If you want your binaries stripped of surplus debug or other
information, use the --strip option.
If you want debug information in the binary (for example, to be
- able to send gdb core dumps to MySQL Support), then you should add the
+ able to send gdb core dumps to support), then you should add the
flag --with-debug; if you want a production build with only debugging
information in the binary then use --debug.
-
- If your aim is not to build MySQL Cluster Carrier Grade Edition, you
- can also use this script to build MySQL Classic and MySQL Enterprise Pro
- versions; see the --extended-help for descriptions of these packages.
EOF
}
@@ -157,9 +135,8 @@ cat <<EOF
Usage: $0 [options]
--help Show this help message.
--sysadmin-help Show help for system administrators wishing
- to build MySQL Cluster Carrier Grade Edition
- or other MySQL versions.
- --developer-help Show help for developers trying to build MySQL
+ to build MariaDB
+ --developer-help Show help for developers trying to build MariaDB
--with-help Show extended help on --with-xxx options to
configure
--extended-help Show extended help message
@@ -199,11 +176,9 @@ Usage: $0 [options]
'path'
--debug Build normal version, but add debug
information to binary
- --developer Use extensions that most MySQL developers use
+ --developer Use extensions that most MariaDB developers use
--no-developer Do not use extensions that most developers of
- MySQL use
- --commercial Use commercial libraries
- --gpl Use gpl libraries
+ MariaDB use
--compiler=[gcc|icc|forte|SunStudio|open64] Select compiler
--cpu=[x86|x86_64|sparc|itanium] Select CPU type
x86 => x86 and 32-bit binary
@@ -213,10 +188,10 @@ Usage: $0 [options]
--32 Build a 32-bit binary even if CPU is 64-bit
--64 Build a 64-bit binary even if not sure a
64-bit CPU is being used
- --package=[cge|extended|pro|classic] Select package to build
+ --package=[pro|classic] Select package to build
--parallelism=number Define parallelism in make
--strip Strip binaries
- --error-inject Enable error injection into MySQL Server and
+ --error-inject Enable error injection into MariaDB Server and
data nodes
--valgrind Build with valgrind
--fast Optimise for CPU architecture built on
@@ -234,12 +209,12 @@ extended_usage()
cat <<EOF
Extended help text for this script:
- -----------------------------------
- This script is intended to make it easier for customers using MySQL
- Cluster Carrier Grade Edition, customers using performance-optimised
- MySQL versions and developers to build the product from source on
- these platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using
- gcc or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
+ -----------------------------------
+
+ This script is intended to make it easier to build
+ performance-optimised MariaDB versions from source on these
+ platforms/compilers: Linux/x86 (32-bit and 64-bit) (either using gcc
+ or icc), Linux Itanium, Solaris 8,9,10 and 11 x86 and SPARC using
gcc or SunStudio and MacOSX/x86/gcc.
The script automatically detects CPU type and operating system; The
@@ -247,49 +222,28 @@ extended_usage()
To build on other platforms you can use the --print-only option on a
supported platform and edit the output for a proper set of commands on
- the specific platform you are using. MySQL also provides custom builds
- for any type of platform that is officially supported for MySQL
- Cluster. For a list of supported platforms, see
- http://www.mysql.com/support/supportedplatforms/cluster.html.
+ the specific platform you are using.
Using the --package option, it is also possible to build a "classic"
- version of MySQL having only the MyISAM storage engine, a "Pro"
- package including all storage engines and other features except MySQL
- Cluster, and an "extended" package including these features plus MySQL
+ version of MariaDB having only the MyISAM storage engine, a "Pro"
+ package including all storage engines and other features except MariaDB
+ Cluster, and an "extended" package including these features plus MariaDB
Cluster (this is the default if the --developer option is used).
- Different MySQL storage engines are included in the build, depending
+ Different MariaDB storage engines are included in the build, depending
on which --package option is used. The comment and version strong
suffix are also set according to the package selected.
- --package=cge
- storage engines:
- ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, NDB
- (All storage engines except InnoDB)
- comment: MySQL Cluster Carrier Grade Edition GPL/Commercial version
- built from source
- version string suffix: -cge
-
- --package=extended
- storage engines:
- ARCHIVE, BLACKHOLE, CSV, FEDERATED, MYISAM, INNODB, NDB
- (All storage engines)
- comment: MySQL Cluster Carrier Grade Extended Edition GPL/Commercial
- version built from source
- version string suffix: -cge-extended
-
--package=pro
storage engines:
ARCHIVE, BLACKHOLE, CSV, FEDERATED, INNODB, MYISAM
(All storage engines except NDB)
- comment: MySQL Pro GPL/Commercial version built from
- source
+ comment: Pro versions
version string suffix: [none]
--package=classic
storage engines: CSV, MYISAM
- comment: MySQL Classic GPL/Commercial version built
- from source
+ comment: Version without InnoDB and Maria
version string suffix: [none]
All packages except Classic include support for user-defined
@@ -299,9 +253,9 @@ extended_usage()
If --with-debug is used, an additional "-debug" is appended to the
version string.
- --commercial
- 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
@@ -387,8 +341,7 @@ extended_usage()
Package-specific options:
-------------------------
--with-innodb
- Specifically included in the "pro" and "extended" packages, and not
- in any of the others.
+ Specifically included in the "pro" package.
--with-comment
Sets the comment for the MySQL version, by package, as described
@@ -401,12 +354,10 @@ extended_usage()
Other options used:
-------------------
--with-readline
- Use the GPL readline library for command editing functions; not
- available with commercial packages.
+ Use the GPL readline library for command editing functions.
--with-libedit
- Use the BSD licensed library for command editing functions; used for
- commercial packages.
+ Use the BSD licensed library for command editing functions.
--with-zlib-dir=bundled
Use the zlib package bundled with MySQL.
@@ -651,9 +602,6 @@ parse_package()
extended )
package="extended"
;;
- cge )
- package="cge"
- ;;
*)
echo "Unknown package '$package'"
exit 1
@@ -795,12 +743,6 @@ parse_options()
--developer)
developer_flag="yes"
;;
- --commercial)
- gpl="no"
- ;;
- --gpl)
- gpl="yes"
- ;;
--compiler=*)
compiler=`get_key_value "$1"`
parse_compiler
@@ -850,7 +792,7 @@ parse_options()
--configure-only)
just_configure="yes"
;;
- --print-only)
+ --print-only|--just-print)
just_print="yes"
;;
--static-linking)
@@ -1151,7 +1093,7 @@ set_warning_flags()
warnings="$warnings -Wcomment -W"
warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label"
- warnings="$warnings -Wunused-value -Wunused-variable"
+ warnings="$warnings -Wunused-value -Wunused-variable -Wno-uninitialized"
if test "x$warning_mode" = "extra" ; then
warnings="$warnings -Wshadow"
@@ -1179,7 +1121,9 @@ set_with_debug_flags()
{
if test "x$with_debug_flag" = "xyes" ; then
if test "x$developer_flag" = "xyes" ; then
- loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
+ loc_debug_flags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG"
+ loc_debug_flags="$loc_debug_flags -Wuninitialized -DFORCE_INIT_OF_VARS"
+ loc_debug_flags="$loc_debug_flags -DSAFEMALLOC"
compiler_flags="$compiler_flags $loc_debug_flags"
fi
compiler_flags="$compiler_flags $extra_debug_flags"
@@ -1254,28 +1198,19 @@ set_base_configs()
if test "x$with_perfschema" != "xno" ; then
base_configs="$base_configs --with-perfschema"
fi
+ base_configs="$base_configs --with-libevent"
}
#
-# Add all standard engines and partitioning (included as part of MySQL
-# Cluster storage engine as well) as part of MySQL Server. These are
-# added in all packages except the classic package.
+# Add all standard engines and partitioning
#
-set_base_engines()
+set_max_engines()
{
- engine_configs="--with-archive-storage-engine"
- engine_configs="$engine_configs --with-blackhole-storage-engine"
- engine_configs="$engine_configs --without-example-storage-engine"
- engine_configs="$engine_configs --with-federated-storage-engine"
- engine_configs="$engine_configs --with-partition"
+ engine_configs="--with-plugins=max --with-plugin-maria --with-maria-tmp-tables"
+ engine_configs="$engine_configs --without-plugin-innodb_plugin"
base_configs="$base_configs $engine_configs"
}
-set_innodb_engine()
-{
- base_configs="$base_configs --with-innodb"
-}
-
set_ndb_engine()
{
base_configs="$base_configs --with-ndbcluster"
@@ -1285,41 +1220,17 @@ set_ndb_engine()
set_pro_package()
{
if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Enterprise Pro $version_text built from source\""
+ base_configs="$base_configs --with-comment=\"Pro $version_text built from source\""
fi
if test "x$with_debug_flag" = "xyes" ; then
base_configs="$base_configs --with-server-suffix=\"-debug\""
fi
}
-set_cge_extended_package()
-{
- if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Extended Edition $version_text built from source\""
- fi
- if test "x$with_debug_flag" = "xyes" ; then
- base_configs="$base_configs --with-server-suffix=\"-cge-extended-debug\""
- else
- base_configs="$base_configs --with-server-suffix=\"-cge-extended\""
- fi
-}
-
-set_cge_package()
-{
- if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Cluster Carrier Grade Edition $version_text built from source\""
- fi
- if test "x$with_debug_flag" = "xyes" ; then
- base_configs="$base_configs --with-server-suffix=\"-cge-debug\""
- else
- base_configs="$base_configs --with-server-suffix=\"-cge\""
- fi
-}
-
set_classic_package()
{
if test "x$without_comment" != "xyes" ; then
- base_configs="$base_configs --with-comment=\"MySQL Classic $version_text built from source\""
+ base_configs="$base_configs --with-comment=\"Classic $version_text built from source\""
fi
if test "x$with_debug_flag" = "xyes" ; then
base_configs="$base_configs --with-server-suffix=\"-debug\""
@@ -1786,11 +1697,7 @@ set_error_inject_configs()
set_default_package()
{
if test "x$package" = "x" ; then
- if test "x$developer_flag" = "xyes" ; then
package="extended"
- else
- package="cge"
- fi
fi
}
@@ -1908,28 +1815,13 @@ set_icc_special_options
#
# Definitions of various packages possible to compile. The default is to
-# build a source variant of MySQL Cluster Carrier Grade Edition
-# including all storage engines except InnoDB, and to use GPL libraries.
+# build a source variant including all storage engines except InnoDB.
#
set_base_configs
-if test "x$gpl" = "xyes" ; then
version_text="GPL version"
-else
- version_text="Commercial version"
-fi
if test "x$package" = "xpro" ; then
- set_base_engines
- set_innodb_engine
+ set_max_engines
set_pro_package
-elif test "x$package" = "xextended" ; then
- set_base_engines
- set_ndb_engine
- set_innodb_engine
- set_cge_extended_package
-elif test "x$package" = "xcge" ; then
- set_base_engines
- set_ndb_engine
- set_cge_package
elif test "x$package" = "xclassic" ; then
set_classic_package
else
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index deae27656a4..070e7de0125 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -1,20 +1,4 @@
#!/bin/sh
-
-# Copyright (C) 2005, 2008 MySQL AB, 2009 Sun Microsystems, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
#
# Check cpu of current machine and find the
# best compiler optimization flags for gcc
diff --git a/BUILD/compile-alpha-debug b/BUILD/compile-alpha-debug
index 51895d3c230..2d8869227dc 100755
--- a/BUILD/compile-alpha-debug
+++ b/BUILD/compile-alpha-debug
@@ -1,20 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2005 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
/bin/rm -f */.deps/*.P */*.o
make -k maintainer-clean
/bin/rm -f */.deps/*.P */*.o
@@ -23,5 +8,5 @@ make -k maintainer-clean
path=`dirname $0`
. "$path/autorun.sh"
-CFLAGS=-O1 CC=gcc CXX=gcc CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
+CFLAGS=-O1 CC=gcc CXX=g++ CXXFLAGS="-O1 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --with-debug --with-extra-charsets=complex --without-extra-tools
make
diff --git a/BUILD/compile-dist b/BUILD/compile-dist
index 5583f2b81c9..754874b1b2b 100755
--- a/BUILD/compile-dist
+++ b/BUILD/compile-dist
@@ -1,20 +1,4 @@
#!/bin/sh
-
-# Copyright (C) 2004, 2006 MySQL AB, 2008, 2009 Sun Microsystems, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
#
# This script's purpose is to update the automake/autoconf helper scripts and
# to run a plain "configure" without any special compile flags. Only features
@@ -44,7 +28,7 @@ fi
# Default to gcc for CC and CXX
if test -z "$CXX" ; then
export CXX
- CXX=gcc
+ CXX=g++
# Set some required compile options
if test -z "$CXXFLAGS" ; then
export CXXFLAGS
diff --git a/BUILD/compile-pentium-pgcc b/BUILD/compile-pentium-pgcc
index 383cd288bf1..5b2193c9fe9 100755
--- a/BUILD/compile-pentium-pgcc
+++ b/BUILD/compile-pentium-pgcc
@@ -1,20 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2005 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
AM_MAKEFLAGS="-j 2"
gmake -k maintainer-clean || true
/bin/rm -f */.deps/*.P config.cache
@@ -23,7 +8,7 @@ path=`dirname $0`
. "$path/autorun.sh"
export PATH=/usr/local/pgcc/bin:$PATH
-CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
+CFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O6 -mpentiumpro -fomit-frame-pointer -mstack-align-double" CXX=g++ CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O6 -fomit-frame-pointer -mpentiumpro -mstack-align-double" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static
gmake -j 4
diff --git a/BUILD/compile-pentium64 b/BUILD/compile-pentium64
index 6d24f681d73..01eb2adf88b 100755
--- a/BUILD/compile-pentium64
+++ b/BUILD/compile-pentium64
@@ -1,27 +1,13 @@
#! /bin/sh
-# Copyright (C) 2006, 2007 MySQL AB
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Library General Public
-# License as published by the Free Software Foundation; version 2
-# of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
-
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium64_cflags $fast_cflags"
-extra_configs="$pentium_configs $static_link"
+# On CentOS/Fedora Core 10 amd64, there is system libz.so but not
+# libz.a, so need to use bundled zlib when building static
+# binary. Hence we use --with-zlib-dir=bundled
+extra_configs="$pentium_configs $static_link --with-zlib-dir=bundled"
CC="$CC --pipe"
strip=yes
diff --git a/BUILD/compile-solaris-amd64-forte b/BUILD/compile-solaris-amd64-forte
index a7d9e37b76b..8e9913d6ddf 100755
--- a/BUILD/compile-solaris-amd64-forte
+++ b/BUILD/compile-solaris-amd64-forte
@@ -16,7 +16,7 @@ gmake -k maintainer-clean || true
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="-m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
+extra_flags="-m64 -fast -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
extra_configs="$max_configs --with-libevent"
warnings=""
diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug
new file mode 100755
index 00000000000..08a095b05c8
--- /dev/null
+++ b/BUILD/compile-solaris-amd64-forte-debug
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# See file compile-solaris-amd64 for basic pre-requisites.
+
+# This build uses the Sun Studio compilers (cc, CC), available from:
+# http://developers.sun.com/sunstudio/downloads/index.jsp
+# Note that you may want to apply current patches, as the downloaded version
+# is typically out of date. Download the PKG version if you intend to patch!
+
+# After installing, add /opt/SUNWspro/bin to your $PATH
+
+
+gmake -k clean || true
+/bin/rm -f */.deps/*.P config.cache
+
+. "$path/SETUP.sh"
+
+extra_flags="-g -m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
+extra_configs="$max_configs --with-libevent"
+
+warnings=""
+c_warnings=""
+cxx_warnings=""
+base_cxxflags="-noex"
+
+CC=cc
+CFLAGS="-xstrconst"
+CXX=CC
+LDFLAGS="-lmtmalloc"
+
+. "$path/FINISH.sh"
diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc
index 783167bebcf..df3cf1e26c3 100755
--- a/BUILD/compile-solaris-sparc
+++ b/BUILD/compile-solaris-sparc
@@ -1,20 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2005 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
@@ -24,6 +9,6 @@ PATH=$PATH:/usr/ccs/bin:/usr/local/bin
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 $EXTRA_FLAGS $EXTRA_CFLAGS" 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 $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
+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 $EXTRA_FLAGS $EXTRA_CFLAGS" CXX=g++ 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 $EXTRA_FLAGS $EXTRA_CXXFLAGS" LIBS="-lmtmalloc" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
make -j 4
diff --git a/BUILD/compile-solaris-sparc-debug b/BUILD/compile-solaris-sparc-debug
index 8e4a4672f2e..e960039baff 100755
--- a/BUILD/compile-solaris-sparc-debug
+++ b/BUILD/compile-solaris-sparc-debug
@@ -1,26 +1,11 @@
#!/bin/sh
-# Copyright (C) 2001, 2005 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
make -k 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 -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=gcc 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 -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
+CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer" CXX=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 -O3 -fno-omit-frame-pointer" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
make -j 4
diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify
index 428ef8a5dca..22fe5b5616e 100755
--- a/BUILD/compile-solaris-sparc-purify
+++ b/BUILD/compile-solaris-sparc-purify
@@ -1,20 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2005 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
mode=""
cxxfilt=""
@@ -52,7 +37,7 @@ make -k maintainer-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_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
+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=g++ 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