mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
Fixed BUILD scripts for gcc 6.x
Added also -DTRASH_FREE_MEMORY to valgrind builds
This commit is contained in:
parent
e6bad1c75d
commit
4a75b480e9
1 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue