diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-04-28 20:30:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-04-28 20:30:22 +0300 |
commit | 709523366d3161cdc3d1416707a79ad4a9f54208 (patch) | |
tree | 042ab36a74255890b41fc123bae1d8f7acac4488 | |
parent | 8291fd8f291e71af418f2f988213a85618a993ed (diff) | |
download | hercules-709523366d3161cdc3d1416707a79ad4a9f54208.tar.gz hercules-709523366d3161cdc3d1416707a79ad4a9f54208.tar.bz2 hercules-709523366d3161cdc3d1416707a79ad4a9f54208.tar.xz hercules-709523366d3161cdc3d1416707a79ad4a9f54208.zip |
Add new gcc sanitize flag -fsanitize=bounds-strict
-rwxr-xr-x | configure | 50 | ||||
-rw-r--r-- | configure.in | 1 |
2 files changed, 50 insertions, 1 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in 367e95d. +# From configure.in 8291fd8. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # @@ -5537,6 +5537,54 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=bounds-strict" >&5 +$as_echo_n "checking whether $CC supports -fsanitize=bounds-strict... " >&6; } + OLD_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -fsanitize=bounds-strict" + OLD_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -fsanitize=bounds-strict" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict" >&5 +$as_echo_n "checking whether $CC requires -fsanitize-undefined-trap-on-error for -fsanitize=bounds-strict... " >&6; } + CFLAGS="$CFLAGS -fsanitize-undefined-trap-on-error" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int foo; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$OLD_CFLAGS" + LDFLAGS="$OLD_LDFLAGS" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=object-size" >&5 $as_echo_n "checking whether $CC supports -fsanitize=object-size... " >&6; } OLD_CFLAGS="$CFLAGS" diff --git a/configure.in b/configure.in index 848e055ea..3968dc568 100644 --- a/configure.in +++ b/configure.in @@ -728,6 +728,7 @@ if test "$enable_sanitize" != "no" ; then AC_CHECK_SANITIZER_FLAG(return) AC_CHECK_SANITIZER_FLAG(signed-integer-overflow) AC_CHECK_SANITIZER_FLAG(bounds) + AC_CHECK_SANITIZER_FLAG(bounds-strict) AC_CHECK_SANITIZER_FLAG(object-size) AC_CHECK_SANITIZER_FLAG(float-divide-by-zero) AC_CHECK_SANITIZER_FLAG(float-cast-overflow) |