summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 11:45:00 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2021-04-21 11:45:00 +0300
commit4930f9c94bb610f4d76b73a8b6b351d9fa9c5d68 (patch)
treeed6b2754116233ca8a39515c7ba06e09b2a8cdc8 /BUILD
parent502b769561760f35d2b612ab984906c8a4bb9b51 (diff)
parentd104fe6f734df2aebe24b3e5e3dbc189a5302920 (diff)
downloadmariadb-git-4930f9c94bb610f4d76b73a8b6b351d9fa9c5d68.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'BUILD')
-rwxr-xr-xBUILD/SETUP.sh2
-rwxr-xr-xBUILD/compile-pentium64-ubsan29
2 files changed, 30 insertions, 1 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 0fd3ee7597a..041749784ce 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -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"
+ warnings="-Wall -Wextra -Wunused -Wwrite-strings -Wno-uninitialized -Wno-strict-aliasing -Wimplicit-fallthrough=2 -Wformat-security -Wvla"
# For more warnings, uncomment the following line
# warnings="$warnings -Wshadow"
diff --git a/BUILD/compile-pentium64-ubsan b/BUILD/compile-pentium64-ubsan
new file mode 100755
index 00000000000..bf56d84283f
--- /dev/null
+++ b/BUILD/compile-pentium64-ubsan
@@ -0,0 +1,29 @@
+#! /bin/sh
+# Copyright (c) 2018, MariaDB Corporation.
+#
+# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
+
+# Compilation with UBSAN, The Undefined Behavior Sanitizer
+# We have to use -Wno-uninitialized and -Wno-unitialized we get a lot of false
+# positive warnings for this when compiling with -fsanitize=undefined.
+# We also have to compile without Spider as linking with Spider library does
+# not work. (errno: 11, undefined symbol: _ZTI12ha_partition)
+
+path=`dirname $0`
+. "$path/SETUP.sh"
+
+extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized"
+extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider --without-tokudb"
+
+. "$path/FINISH.sh"