diff options
author | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2010-11-25 18:17:28 +0100 |
commit | 65ca700def99289cc31a7040537f5aa6e12bf485 (patch) | |
tree | 97b3a07299b626c519da0e80c122b5b79b933914 /BUILD | |
parent | 2ab57de38d13d927ddff2d51aed4af34e13998f5 (diff) | |
parent | 6e5bcca7935d3c62f84bb640e5357664a210ee12 (diff) | |
download | mariadb-git-65ca700def99289cc31a7040537f5aa6e12bf485.tar.gz |
merge.
checkpoint.
does not compile.
Diffstat (limited to 'BUILD')
28 files changed, 423 insertions, 187 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index b7f7a1db77e..32c9f82beb4 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -1,6 +1,6 @@ -cflags="$c_warnings $extra_flags" -cxxflags="$cxx_warnings $base_cxxflags $extra_flags" -extra_configs="$extra_configs $local_infile_configs" +cflags="$c_warnings $extra_flags $EXTRA_FLAGS $EXTRA_CFLAGS" +cxxflags="$cxx_warnings $base_cxxflags $extra_flags $EXTRA_FLAGS $EXTRA_CXXFLAGS" +extra_configs="$extra_configs $local_infile_configs $EXTRA_CONFIGS" configure="./configure $base_configs $extra_configs" commands="\ diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am index 56c86e7a80c..0fa49e2862f 100644 --- a/BUILD/Makefile.am +++ b/BUILD/Makefile.am @@ -33,6 +33,7 @@ EXTRA_DIST = FINISH.sh \ compile-amd64-max \ compile-amd64-max-sci \ compile-amd64-valgrind-max \ + compile-bintar \ compile-darwin-mwcc \ compile-dist \ compile-hpux11-parisc2-aCC \ @@ -69,9 +70,14 @@ EXTRA_DIST = FINISH.sh \ compile-ppc-max \ compile-solaris-amd64 \ compile-solaris-amd64-debug \ + compile-solaris-amd64-debug-forte \ compile-solaris-amd64-forte \ - compile-solaris-amd64-forte-debug \ compile-solaris-sparc \ compile-solaris-sparc-debug \ compile-solaris-sparc-forte \ - compile-solaris-sparc-purify + compile-solaris-sparc-purify \ + compile-solaris-x86-32 \ + compile-solaris-x86-32-debug \ + compile-solaris-x86-32-debug-forte \ + compile-solaris-x86-forte-32 \ + util.sh diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index a23a801e7e0..44e5ed74ab7 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -31,6 +31,14 @@ parse_options() prefix=`get_key_value "$1"`;; --warning-mode=*) warning_mode=`get_key_value "$1"`;; + --extra-flags=*) + EXTRA_FLAGS=`get_key_value "$1"`;; + --extra-cflags=*) + EXTRA_CFLAGS=`get_key_value "$1"`;; + --extra-cxxflags=*) + EXTRA_CXXFLAGS=`get_key_value "$1"`;; + --extra-configs=*) + EXTRA_CONFIGS=`get_key_value "$1"`;; -c | --just-configure) just_configure=1;; -n | --just-print | --print) @@ -75,13 +83,13 @@ set -e # path=`dirname $0` . "$path/check-cpu" +. "$path/util.sh" -export AM_MAKEFLAGS -AM_MAKEFLAGS="-j 6" +get_make_parallel_flag # 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. +# implementation of SSL. To use OpenSSL you will need to specify +# the location of OpenSSL headers and libs on your system. # Ex --with-ssl=/usr SSL_LIBRARY=--with-ssl @@ -139,6 +147,13 @@ fast_cflags="-O3 -fno-omit-frame-pointer" debug_configs="--with-debug" debug_cflags="$debug_cflags $debug_extra_cflags" +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" + # # Configuration options. # @@ -146,6 +161,9 @@ base_configs="--prefix=$prefix --enable-assembler " 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 --without-plugin-innodb_plugin" +# 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 @@ -155,17 +173,11 @@ then base_configs="$base_configs --with-libedit" 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 -local_infile_configs="--enable-local-infile" - - 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" +max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache" +max_no_ndb_configs="$SSL_LIBRARY --with-plugins=max-no-ndb --with-embedded-server --with-libevent" +max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent" +all_configs="$SSL_LIBRARY --with-plugins=max --with-plugin-ndbcluster --with-embedded-server --with-innodb_plugin --with-libevent" # # CPU and platform specific compilation flags. @@ -190,7 +202,7 @@ if test -z "$CC" ; then fi if test -z "$CXX" ; then - CXX=gcc + CXX=g++ fi # If ccache (a compiler cache which reduces build time) diff --git a/BUILD/compile-amd64-debug-all b/BUILD/compile-amd64-debug-all new file mode 100755 index 00000000000..b8b2ed05402 --- /dev/null +++ b/BUILD/compile-amd64-debug-all @@ -0,0 +1,7 @@ +#! /bin/sh +path=`dirname $0` +. "$path/SETUP.sh" +extra_flags="$amd64_cflags $debug_cflags" +extra_configs="$amd64_configs $debug_configs $all_configs" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-amd64-gprof-no-ndb b/BUILD/compile-amd64-gprof-no-ndb new file mode 100755 index 00000000000..9fd4c67155c --- /dev/null +++ b/BUILD/compile-amd64-gprof-no-ndb @@ -0,0 +1,7 @@ +#! /bin/sh +path=`dirname $0` +. "$path/SETUP.sh" +extra_flags="$amd64_cflags -pg -g" +extra_configs="$amd64_configs $max_no_ndb_configs --disable-shared $static_link" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-bintar b/BUILD/compile-bintar new file mode 100755 index 00000000000..2b039e439c0 --- /dev/null +++ b/BUILD/compile-bintar @@ -0,0 +1,79 @@ +#!/bin/bash +# +# MariaDB SQL server. +# Copyright (C) 2010 Kristian Nielsen and Monty Program 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. + + +# This script's purpose is to build the binary tarball packages for MariaDB +# (currently only on Linux systems). +# +# Thus BUILD/compile-bintar from the appropriate source tarball will reproduce +# such a release, provided the build environment (gcc version etc.) matches +# (use scripts/make_binary_distribution after running this script to actually +# create the binary tarball package). +# +# Note that packages are built from source tarballs not bzr checkouts. +# Therefore, this script assumes autotools have already been run. +# +# We link libc dynamically, otherwise we get lots of problems loading +# .so files at runtime (either system stuff like NSS, or server +# plugins). +# +# We link libgcc statically to avoid reduce nasty library version dependencies. + +test -f Makefile && make distclean + +path=`dirname $0` +. $path/util.sh + +SYSTEM_TYPE="$(uname -o)" +MACHINE_TYPE="$(uname -m)" + +# We cannot have a slash '/' in tarfile name. +SYSTEM_TYPE="$(echo ${SYSTEM_TYPE} | sed -e 's/GNU\///')" + +# Get correct options for architecture into CPUOPT. +get_cpuopt +# Get correct -j option into AM_MAKEFLAGS +get_make_parallel_flag + +# Use gcc rather than g++ to avoid linking libstdc++.so (which we don't need). +FLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall $CPUOPT" + +# Don't press on in case of error. +set -e + +CC="gcc -static-libgcc" CXX="g++ -static-libgcc" CFLAGS="$FLAGS" CXXFLAGS="$FLAGS" \ + ./configure \ + --prefix=/usr/local/mysql \ + --exec-prefix=/usr/local/mysql \ + --libexecdir=/usr/local/mysql/bin \ + --localstatedir=/usr/local/mysql/data \ + \ + --with-comment="(MariaDB - http://mariadb.com/)" \ + --with-system-type="${SYSTEM_TYPE}" \ + --with-machine-type="${MACHINE_TYPE}" \ + \ + --enable-shared --enable-static \ + --with-client-ldflags=-static --with-mysqld-ldflags=-static \ + --enable-thread-safe-client --enable-local-infile --with-big-tables \ + --without-docs --with-extra-charsets=all \ + --with-libwrap --with-ssl --with-readline --with-libevent --with-zlib-dir=bundled \ + --with-partition --with-embedded-server \ + --with-plugins=max-no-ndb \ + --without-plugin-innodb_plugin + +make $AM_MAKEFLAGS diff --git a/BUILD/compile-dist b/BUILD/compile-dist index 9fe3aaf8bb5..cabe094cfc0 100755 --- a/BUILD/compile-dist +++ b/BUILD/compile-dist @@ -78,6 +78,5 @@ fi ./configure \ --with-embedded-server \ --with-perfschema \ - --with-ndbcluster -$gmake - + --with-plugins=max-no-ndb +$gmake -j4 diff --git a/BUILD/compile-innodb b/BUILD/compile-innodb new file mode 100755 index 00000000000..82601f03ae9 --- /dev/null +++ b/BUILD/compile-innodb @@ -0,0 +1,24 @@ +#! /bin/sh +# +# Copyright (c) 2006, 2009, Innobase Oy. All Rights Reserved. +# +# 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 +# + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $fast_cflags -g" +extra_configs="$pentium_configs $static_link --with-plugins=innobase" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-innodb-debug b/BUILD/compile-innodb-debug new file mode 100755 index 00000000000..efb4abf88d5 --- /dev/null +++ b/BUILD/compile-innodb-debug @@ -0,0 +1,24 @@ +#! /bin/sh +# +# Copyright (c) 2005, 2009, Innobase Oy. All Rights Reserved. +# +# 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 +# + +path=`dirname $0` +. "$path/SETUP.sh" $@ --with-debug=full + +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs --with-plugins=innobase" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium index b8f8d028e1f..cdbc7e773eb 100755 --- a/BUILD/compile-pentium +++ b/BUILD/compile-pentium @@ -4,7 +4,7 @@ path=`dirname $0` . "$path/SETUP.sh" extra_flags="$pentium_cflags $fast_cflags" -extra_configs="$pentium_configs $static_link" +extra_configs="$pentium_configs" strip=yes . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-all b/BUILD/compile-pentium-debug-all new file mode 100755 index 00000000000..710ce8af63c --- /dev/null +++ b/BUILD/compile-pentium-debug-all @@ -0,0 +1,10 @@ +#! /bin/sh + +path=`dirname $0` +set -- "$@" --with-debug=full +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs $all_configs $error_inject --with-experimental-collations" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium-debug-max-no-qc b/BUILD/compile-pentium-debug-max-no-qc new file mode 100755 index 00000000000..6407b4b09ad --- /dev/null +++ b/BUILD/compile-pentium-debug-max-no-qc @@ -0,0 +1,10 @@ +#! /bin/sh +# Builds server without query cache support + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="$pentium_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs $max_no_qc_configs" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-debug-all b/BUILD/compile-pentium64-debug-all new file mode 100755 index 00000000000..7824f7ad47f --- /dev/null +++ b/BUILD/compile-pentium64-debug-all @@ -0,0 +1,12 @@ +#! /bin/sh + +path=`dirname $0` +set -- "$@" --with-debug=full +. "$path/SETUP.sh" + +extra_flags="$pentium64_cflags $debug_cflags" +extra_configs="$pentium_configs $debug_configs $all_configs" + +extra_configs="$extra_configs " +CC="$CC --pipe" +. "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-gcov b/BUILD/compile-pentium64-gcov index 5a99b7f8796..0334f0e28f4 100755 --- a/BUILD/compile-pentium64-gcov +++ b/BUILD/compile-pentium64-gcov @@ -9,9 +9,9 @@ export CCACHE_DISABLE export LDFLAGS="$gcov_link_flags" -extra_flags="$pentium64_cflags $debug_cflags $max_cflags $gcov_compile_flags" +extra_flags="$pentium64_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" +extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --with-zlib-dir=bundled" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-gprof b/BUILD/compile-pentium64-gprof index f64dee6d196..662396f04ed 100755 --- a/BUILD/compile-pentium64-gprof +++ b/BUILD/compile-pentium64-gprof @@ -4,6 +4,6 @@ path=`dirname $0` . "$path/SETUP.sh" extra_flags="$pentium64_cflags $gprof_compile_flags" -extra_configs="$pentium64_configs $debug_configs $gprof_link_flags" +extra_configs="$pentium_configs $max_configs $gprof_link_flags --with-zlib-dir=bundled" . "$path/FINISH.sh" diff --git a/BUILD/compile-pentium64-max b/BUILD/compile-pentium64-max index 9acd5e7c460..e6695f292e4 100755 --- a/BUILD/compile-pentium64-max +++ b/BUILD/compile-pentium64-max @@ -4,7 +4,10 @@ path=`dirname $0` . "$path/SETUP.sh" extra_flags="$pentium64_cflags $fast_cflags" -extra_configs="$pentium_configs $max_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 $max_configs $static_link --with-zlib-dir=bundled" CC="$CC --pipe" strip=yes diff --git a/BUILD/compile-solaris-amd64 b/BUILD/compile-solaris-amd64 index f128fb12973..92eff101d4c 100755 --- a/BUILD/compile-solaris-amd64 +++ b/BUILD/compile-solaris-amd64 @@ -1,55 +1,32 @@ -#!/usr/bin/bash +#!/bin/sh -function _find_mysql_root () ( - while [ "x$PWD" != "x/" ]; do - # Check if some directories are present - if [ -d BUILD -a -d sql -a -d mysys ]; then - echo "$PWD" - return 0 - fi - cd .. - done - return 1 -) +# Build setup for Solaris 10 + +# Make the Sun Freeware packages use the bundled Perl, instead of their own: +# ln -s `which perl` /usr/local/bin +# Your $PATH needs to include (in this order): +# /usr/local/bin:/usr/sfw/bin:/usr/ccs/bin +# (For Sun Freeware, bundled GNU utilities, Solaris ar, etc.) +# +# Required packages from http://sunfreeware.com/indexintel10.html : +# (The GNU m4 bundled with Solaris is too old.) +# automake-1.10.2-sol10-x86-local.gz +# autoconf-2.63-sol10-x86-local.gz +# m4-1.4.12-sol10-x86-local.gz +# libsigsegv-2.6-sol10-x86-local.gz +# libtool-1.5.24-sol10-x86-local.gz +# ( how to install these packages: + # wget ftp://ftp.sunfreeware.com/pub/freeware/intel/10/automake-1.10.2-sol10-x86-local.gz + # gunzip automake-1.10.2-sol10-x86-local.gz + # pkgadd -d automake-1.10.2-sol10-x86-local +# ) -make -k clean || true -/bin/rm -f */.deps/*.P config.cache - path=`dirname $0` -. "$path/autorun.sh" - -warning_flags="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused" -compiler_flags="-g -O3 -fno-omit-frame-pointer" +. "$path/SETUP.sh" +extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64" +extra_configs="$amd64_configs $max_configs --with-libevent" -export CC CXX CFLAGS CXXFLAGS LDFLAGS LIBS -CC="gcc" -CXX="gcc" -CFLAGS="$warning_flags $compiler_flags" -CXXFLAGS="" -LDFLAGS="-O3 -g -static-libgcc" -LIBS=-lmtmalloc -root=$(_find_mysql_root) +LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64" +export LDFLAGS -$root/configure \ - --prefix=/usr/local/mysql \ - --localstatedir=/usr/local/mysql/data \ - --libexecdir=/usr/local/mysql/bin \ - --with-extra-charsets=complex \ - --enable-thread-safe-client \ - --enable-local-infile \ - --with-zlib-dir=bundled \ - --with-big-tables \ - --with-readline \ - --with-archive-storage-engine \ - --with-named-curses=-lcurses \ - --with-big-tables \ - --with-innodb \ - --with-berkeley-db \ - --with-example-storage-engine \ - --with-blackhole-storage-engine \ - --with-ndbcluster \ - --with-federated-storage-engine \ - --with-csv-storage-engine \ - --with-ssl \ - --with-embedded-server \ - --disable-shared +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-debug b/BUILD/compile-solaris-amd64-debug index ad1c298907f..38e910ae7c9 100644..100755 --- a/BUILD/compile-solaris-amd64-debug +++ b/BUILD/compile-solaris-amd64-debug @@ -1,10 +1,11 @@ -#! /bin/sh +#!/bin/sh + path=`dirname $0` . "$path/SETUP.sh" -amd64_cflags="-m64 -mtune=athlon64" -extra_flags="$amd64_cflags $debug_cflags $max_cflags" -c_warnings="$c_warnings $debug_extra_warnings" -cxx_warnings="$cxx_warnings $debug_extra_warnings" -extra_configs="$amd64_configs $debug_configs $max_configs --enable-thread-safe-client" +extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64 $debug_cflags" +extra_configs="$amd64_configs $debug_configs $max_configs --with-libevent" + +LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64" +export LDFLAGS . "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-debug-forte b/BUILD/compile-solaris-amd64-debug-forte new file mode 100755 index 00000000000..7ccf0f3a9a3 --- /dev/null +++ b/BUILD/compile-solaris-amd64-debug-forte @@ -0,0 +1,27 @@ +#!/bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +# Take only #define options - the others are gcc specific. +# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags) +DEFS="" +for F in $debug_cflags ; do + expr "$F" : "^-D" && DEFS="$DEFS $F" +done +debug_cflags="-O0 -g $DEFS" + +extra_flags="-m64 -mt -D_FORTEC_ -xlibmopt -fns=no $debug_cflags" +extra_configs="$max_configs --with-libevent $debug_configs" + +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-amd64-forte b/BUILD/compile-solaris-amd64-forte index 03a566a0d12..c89b3129a1b 100755 --- a/BUILD/compile-solaris-amd64-forte +++ b/BUILD/compile-solaris-amd64-forte @@ -1,53 +1,29 @@ -#! /bin/sh +#!/bin/sh -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.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 -# For "optimal" code for this computer add -fast to EXTRA -# To compile 64 bit, add -m64 to EXTRA_64_BIT -EXTRA_64_BIT="-m64" -EXTRA="-fast" +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="-m64 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3" +extra_configs="$max_configs --with-libevent" -# -# The following should not need to be touched -# +warnings="" +c_warnings="" +cxx_warnings="" +base_cxxflags="-noex" -export CC CXX CFLAGS CXXFLAGS LIBS -STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT" -ASFLAGS="$EXTRA_64_BIT" -CC=cc-5.0 -CFLAGS="-Xa -xstrconst $STD" +CC=cc +CFLAGS="-xstrconst" CXX=CC -CXXFLAGS="-noex $STD" -LIBS=-lmtmalloc -./configure \ - --prefix=/usr/local/mysql \ - --localstatedir=/usr/local/mysql/data \ - --libexecdir=/usr/local/mysql/bin \ - --with-extra-charsets=complex \ - --enable-thread-safe-client \ - --enable-local-infile \ - --with-zlib-dir=bundled \ - --with-big-tables \ - --with-readline \ - --with-archive-storage-engine \ - --with-named-curses=-lcurses \ - --with-big-tables \ - --with-innodb \ - --with-example-storage-engine \ - --with-blackhole-storage-engine \ - --with-federated-storage-engine \ - --with-csv-storage-engine \ - --with-ssl \ - --enable-assembler - -# Not including: -# --with-ndbcluster -# --with-berkeley-db - -gmake -j4 -test $? = 0 && make test +LDFLAGS="-lmtmalloc" + +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-amd64-forte-debug b/BUILD/compile-solaris-amd64-forte-debug deleted file mode 100644 index 4b0726bb3ce..00000000000 --- a/BUILD/compile-solaris-amd64-forte-debug +++ /dev/null @@ -1,54 +0,0 @@ -#! /bin/sh - -gmake -k clean || true -/bin/rm -f */.deps/*.P config.cache - -path=`dirname $0` -. "$path/autorun.sh" - -# To compile 64 bit, add -m64 to EXTRA_64_BIT -EXTRA_64_BIT="-m64" - -# For "optimal" code for this computer add -fast to EXTRA. Note that -# this causes problem with debugging the program since -fast implies -# -xO5. -EXTRA="" - -# -# The following should not need to be touched -# - -export CC CXX CFLAGS CXXFLAGS -STD="-g -mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT $debug_cflags" -ASFLAGS="$EXTRA_64_BIT" -CC=cc-5.0 -CFLAGS="-Xa -xstrconst $STD" -CXX=CC -CXXFLAGS="-noex $STD" -./configure \ - --prefix=/usr/local/mysql \ - --localstatedir=/usr/local/mysql/data \ - --libexecdir=/usr/local/mysql/bin \ - --with-extra-charsets=complex \ - --enable-thread-safe-client \ - --enable-local-infile \ - --with-zlib-dir=bundled \ - --with-big-tables \ - --with-readline \ - --with-archive-storage-engine \ - --with-named-curses=-lcurses \ - --with-big-tables \ - --with-innodb \ - --with-example-storage-engine \ - --with-blackhole-storage-engine \ - --with-federated-storage-engine \ - --with-csv-storage-engine \ - --with-ssl \ - --with-debug \ - --enable-assembler - -# Not including: -# --with-ndbcluster -# --with-berkeley-db - -gmake -j4 diff --git a/BUILD/compile-solaris-sparc b/BUILD/compile-solaris-sparc index b287baa6845..bc74d7275f3 100755 --- a/BUILD/compile-solaris-sparc +++ b/BUILD/compile-solaris-sparc @@ -9,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" 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" 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=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 make -j 4 diff --git a/BUILD/compile-solaris-sparc-purify b/BUILD/compile-solaris-sparc-purify index 08308f05f4e..989587fbe99 100755 --- a/BUILD/compile-solaris-sparc-purify +++ b/BUILD/compile-solaris-sparc-purify @@ -37,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_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 +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 diff --git a/BUILD/compile-solaris-x86-32 b/BUILD/compile-solaris-x86-32 new file mode 100755 index 00000000000..29965524479 --- /dev/null +++ b/BUILD/compile-solaris-x86-32 @@ -0,0 +1,11 @@ +#!/bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" +extra_flags="-D__sun -m32" +extra_configs="$max_configs --with-libevent" + +LDFLAGS="-lmtmalloc -R/usr/sfw/lib" +export LDFLAGS + +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-x86-32-debug b/BUILD/compile-solaris-x86-32-debug new file mode 100755 index 00000000000..9ce91495c1c --- /dev/null +++ b/BUILD/compile-solaris-x86-32-debug @@ -0,0 +1,11 @@ +#!/bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" +extra_flags="-D__sun -m32 $debug_cflags" +extra_configs="$max_configs --with-libevent $debug_configs" + +LDFLAGS="-lmtmalloc -R/usr/sfw/lib" +export LDFLAGS + +. "$path/FINISH.sh" diff --git a/BUILD/compile-solaris-x86-32-debug-forte b/BUILD/compile-solaris-x86-32-debug-forte new file mode 100755 index 00000000000..777360865a2 --- /dev/null +++ b/BUILD/compile-solaris-x86-32-debug-forte @@ -0,0 +1,27 @@ +#!/bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +# Take only #define options - the others are gcc specific. +# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags) +DEFS="" +for F in $debug_cflags ; do + expr "$F" : "^-D" && DEFS="$DEFS $F" +done +debug_cflags="-O0 -g $DEFS" + +extra_flags="-m32 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3 $debug_cflags" +extra_configs="$max_configs --with-libevent $debug_configs" + +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-x86-forte-32 b/BUILD/compile-solaris-x86-forte-32 new file mode 100755 index 00000000000..5aac376a44c --- /dev/null +++ b/BUILD/compile-solaris-x86-forte-32 @@ -0,0 +1,19 @@ +#!/bin/sh + +path=`dirname $0` +. "$path/SETUP.sh" + +extra_flags="-m32 -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/util.sh b/BUILD/util.sh new file mode 100644 index 00000000000..c8559184013 --- /dev/null +++ b/BUILD/util.sh @@ -0,0 +1,48 @@ +# MariaDB SQL server. +# Copyright (C) 2010 Kristian Nielsen and Monty Program 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. + +# Setting cpu options. +get_cpuopt () { + case "$(uname -o)" in + *Linux*) + case "$(gcc -dumpmachine)" in + x86_64-*) + # gcc barfs on -march=... on x64 + CPUOPT="-m64 -mtune=generic" + ;; + *) + # we'd use i586 to not trip up mobile/lowpower devices + CPUOPT="-m32 -march=i586 -mtune=generic" + ;; + esac + ;; + *Solaris*) + # ToDo: handle 32-bit build? For now default to 64-bit. + CPUOPT="-D__sun -m64 -mtune=athlon64" + ;; + esac + return 0 +} + +# Default to a parallel build, but only if AM_MAKEFLAGS is not set. +# (So buildbots can easily disable this behaviour if required.) +get_make_parallel_flag () { + if test -z "$AM_MAKEFLAGS" + then + AM_MAKEFLAGS="-j 6" + fi + return 0 +} |