diff options
author | unknown <knielsen@knielsen-hq.org> | 2010-03-30 18:16:57 +0200 |
---|---|---|
committer | unknown <knielsen@knielsen-hq.org> | 2010-03-30 18:16:57 +0200 |
commit | 5a3b3d9afb6233ff785eab2a9679374ae274a75c (patch) | |
tree | 875f73a5e544d5081679d47586ae25b90498fb86 /BUILD | |
parent | 205baff9ab39cc030b950ae751118561918f3e83 (diff) | |
parent | d904739cc1d98107f67e76a67b0ea6eb2af326ec (diff) | |
download | mariadb-git-5a3b3d9afb6233ff785eab2a9679374ae274a75c.tar.gz |
automerge
Diffstat (limited to 'BUILD')
-rw-r--r-- | BUILD/Makefile.am | 4 | ||||
-rwxr-xr-x | BUILD/SETUP.sh | 10 | ||||
-rwxr-xr-x | BUILD/compile-bintar | 81 | ||||
-rwxr-xr-x | BUILD/compile-pentium64-gcov | 4 | ||||
-rwxr-xr-x | BUILD/compile-pentium64-gprof | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | BUILD/compile-solaris-amd64-debug-forte | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | BUILD/compile-solaris-x86-32 | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | BUILD/compile-solaris-x86-32-debug | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | BUILD/compile-solaris-x86-32-debug-forte | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | BUILD/compile-solaris-x86-forte-32 | 0 | ||||
-rw-r--r-- | BUILD/util.sh | 48 |
11 files changed, 137 insertions, 12 deletions
diff --git a/BUILD/Makefile.am b/BUILD/Makefile.am index 8343f1e2f27..6cf86f40535 100644 --- a/BUILD/Makefile.am +++ b/BUILD/Makefile.am @@ -34,6 +34,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 \ @@ -80,7 +81,8 @@ EXTRA_DIST = FINISH.sh \ compile-solaris-x86-32 \ compile-solaris-x86-32-debug \ compile-solaris-x86-32-debug-forte \ - compile-solaris-x86-forte-32 + compile-solaris-x86-forte-32 \ + util.sh # Don't update the files from bitkeeper %::SCCS/s.% diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 3df03dc8509..f38ecf6d8b9 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -86,15 +86,9 @@ set -e # path=`dirname $0` . "$path/check-cpu" +. "$path/util.sh" -export AM_MAKEFLAGS -# Default to a parallel build, but only if AM_MAKEFLAGS is not set. -# (So buildbots can easily disable this behaviour if required.) -if test -z "$AM_MAKEFLAGS" -then - AM_MAKEFLAGS="-j 6" -fi - +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 diff --git a/BUILD/compile-bintar b/BUILD/compile-bintar new file mode 100755 index 00000000000..8777cfb2670 --- /dev/null +++ b/BUILD/compile-bintar @@ -0,0 +1,81 @@ +#!/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 (and avoid linking libstdc++ at all by +# CXX=gcc), 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). +COMP="gcc -static-libgcc" +FLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall $CPUOPT" + +# Don't press on in case of error. +set -e + +CC="$COMP" CXX="$COMP" 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-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-solaris-amd64-debug-forte b/BUILD/compile-solaris-amd64-debug-forte index 7ccf0f3a9a3..7ccf0f3a9a3 100644..100755 --- a/BUILD/compile-solaris-amd64-debug-forte +++ b/BUILD/compile-solaris-amd64-debug-forte diff --git a/BUILD/compile-solaris-x86-32 b/BUILD/compile-solaris-x86-32 index 29965524479..29965524479 100644..100755 --- a/BUILD/compile-solaris-x86-32 +++ b/BUILD/compile-solaris-x86-32 diff --git a/BUILD/compile-solaris-x86-32-debug b/BUILD/compile-solaris-x86-32-debug index 9ce91495c1c..9ce91495c1c 100644..100755 --- a/BUILD/compile-solaris-x86-32-debug +++ b/BUILD/compile-solaris-x86-32-debug diff --git a/BUILD/compile-solaris-x86-32-debug-forte b/BUILD/compile-solaris-x86-32-debug-forte index 777360865a2..777360865a2 100644..100755 --- a/BUILD/compile-solaris-x86-32-debug-forte +++ b/BUILD/compile-solaris-x86-32-debug-forte diff --git a/BUILD/compile-solaris-x86-forte-32 b/BUILD/compile-solaris-x86-forte-32 index 5aac376a44c..5aac376a44c 100644..100755 --- a/BUILD/compile-solaris-x86-forte-32 +++ b/BUILD/compile-solaris-x86-forte-32 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 +} |