summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2021-06-14 21:59:49 +0200
committerAnel Husakovic <anel@mariadb.org>2021-06-15 04:54:52 +0200
commitcb0e22a62572d9c18312983e995c59e5c56f4619 (patch)
tree948256c643df168413576afb17509d86f58bd1c8
parent8a2b4d531dc661ee605eeecdfc901bc833f86564 (diff)
downloadmariadb-git-bb-10.4-anel-MDEV-25916-build-script.tar.gz
MDEV-25916: Compilation failed for compile-pentium64-gcov scriptbb-10.4-anel-MDEV-25916-build-script
- Commit e3bffd579f4a introduced the change Reviewed by: monty@mariadb.com
-rwxr-xr-xBUILD/SETUP.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index c3c7acecf96..2dba21e9fe8 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -141,7 +141,13 @@ 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 -Wformat-security -Wvla"
+ ver=$(gcc -dumpversion|cut -c1,1)
+ flag=
+ if [ $ver -gt 6 ]
+ then
+ flag="-Wimplicit-fallthrough=2"
+ fi
+ warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing $flag -Wformat-security -Wvla"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"