From 2d857144485fd125b875f1bf6a0e551174ef8713 Mon Sep 17 00:00:00 2001 From: Monty Date: Fri, 30 Aug 2019 16:07:26 +0300 Subject: Updated BUILD/SETUP from MariaDB 10.5 --- BUILD/SETUP.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'BUILD/SETUP.sh') diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index 4762709e1f3..8a7238c359f 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -122,7 +122,8 @@ get_make_parallel_flag # SSL library to use.--with-ssl will select our bundled yaSSL # implementation of SSL. --with-ssl=yes will first try system library # then the boundled one --with-ssl=system will use the system library. -SSL_LIBRARY=--with-ssl=system +# We use bundled by default as this is guaranteed to work with Galera +SSL_LIBRARY=--with-ssl if [ "x$warning_mode" = "xpedantic" ]; then warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE" @@ -140,7 +141,7 @@ elif [ "x$warning_mode" = "xmaintainer" ]; then debug_extra_cflags="-g3" else # Both C and C++ warnings - warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized" + warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing" # For more warnings, uncomment the following line # warnings="$warnings -Wshadow" @@ -159,7 +160,10 @@ fi # Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro # UNINIT_VAR(), which is only useful for silencing spurious warnings # of static analysis tools. We want UNINIT_VAR() to be a no-op in Valgrind. -valgrind_flags="-DHAVE_valgrind -USAFEMALLOC" +# TRASH_FREE_MEMORY is enabled so that we can find wrong memory accesses +# even when running a test without valgrind +# +valgrind_flags="-DHAVE_valgrind -USAFEMALLOC -DTRASH_FREE_MEMORY" valgrind_flags="$valgrind_flags -UFORCE_INIT_OF_VARS -Wno-uninitialized" valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max" valgrind_configs="--with-valgrind" @@ -169,7 +173,7 @@ debug_cflags="-DEXTRA_DEBUG -DSAFE_MUTEX -DSAFEMALLOC" error_inject="--with-error-inject " # # Base C++ flags for all builds -base_cxxflags="-felide-constructors -fexceptions -fno-rtti" +base_cxxflags="-felide-constructors -fexceptions" # # Flags for optimizing builds. # Be as fast as we can be without losing our ability to backtrace. @@ -194,6 +198,8 @@ 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" +# Following is to get tokudb to work +base_configs="$base_configs --with-jemalloc=NO" if test -d "$path/../cmd-line-utils/readline" then @@ -205,7 +211,7 @@ fi max_no_embedded_configs="$SSL_LIBRARY --with-plugins=max" max_no_qc_configs="$SSL_LIBRARY --with-plugins=max --without-query-cache" -max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic" +max_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-libevent --without-plugin=plugin_file_key_management --with-plugin-rocksdb=dynamic --with-plugin-test_sql_discovery=DYNAMIC" all_configs="$SSL_LIBRARY --with-plugins=max --with-embedded-server --with-innodb_plugin --with-libevent" # @@ -249,6 +255,11 @@ if test `$CC -v 2>&1 | tail -1 | sed 's/ .*$//'` = 'gcc' ; then then debug_cflags="$debug_cflags -DFORCE_INIT_OF_VARS -Wuninitialized" fi + if (test '(' "$GCCV1" -gt '6' ')') + then + c_warnings="$c_warnings -Wimplicit-fallthrough=2" + cxx_warnings="$cxx_warnings -Wimplicit-fallthrough=2" + fi fi -- cgit v1.2.1