Commit 4a75b480 authored by Monty's avatar Monty Committed by Sergei Golubchik

Fixed BUILD scripts for gcc 6.x

Added also -DTRASH_FREE_MEMORY to valgrind builds
parent e6bad1c7
......@@ -141,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 -Wno-strict-aliasing -Wimplicit-fallthrough=2"
warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
......@@ -160,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"
......@@ -252,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment