summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-03 16:52:38 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-03 16:52:38 +0300
commitdf98280e54cc199f3ff93cba848be1911ec9b8d9 (patch)
treef5712e1cd996c4ca9c45534bd09b53aee780d7a5
parent18c113350a4ac9c712f81b1143269ee7f678ea6c (diff)
downloadhercules-df98280e54cc199f3ff93cba848be1911ec9b8d9.tar.gz
hercules-df98280e54cc199f3ff93cba848be1911ec9b8d9.tar.bz2
hercules-df98280e54cc199f3ff93cba848be1911ec9b8d9.tar.xz
hercules-df98280e54cc199f3ff93cba848be1911ec9b8d9.zip
Add sanity into LDFLAGS also.
Fix small typo.
-rwxr-xr-xconfigure55
-rw-r--r--configure.in6
2 files changed, 58 insertions, 3 deletions
diff --git a/configure b/configure
index 3e0c4746c..75fd62a97 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in f5ed898.
+# From configure.in 18c1133.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69.
#
@@ -5066,6 +5066,8 @@ if test "$enable_sanitize" != "no" ; then
$as_echo_n "checking whether $CC supports -fsanitize=address... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=address"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=address"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5097,6 +5099,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5107,12 +5110,14 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$enable_sanitize" == "full" ; then
- # skipped because server have multiple issues -fsanitize=alignment
+ # skipped because server have multiple issues: -fsanitize=alignment
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -fsanitize=shift" >&5
$as_echo_n "checking whether $CC supports -fsanitize=shift... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=shift"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=shift"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5144,6 +5149,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5158,6 +5164,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=integer-divide-by-zero... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=integer-divide-by-zero"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=integer-divide-by-zero"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5189,6 +5197,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5203,6 +5212,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=unreachable... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=unreachable"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=unreachable"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5234,6 +5245,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5248,6 +5260,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=vla-bound... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=vla-bound"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=vla-bound"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5279,6 +5293,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5293,6 +5308,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=null... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=null"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5324,6 +5341,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5338,6 +5356,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=return... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=return"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=return"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5369,6 +5389,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5383,6 +5404,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=signed-integer-overflow... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=signed-integer-overflow"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=signed-integer-overflow"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5414,6 +5437,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5428,6 +5452,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=bounds... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=bounds"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=bounds"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5459,6 +5485,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5473,6 +5500,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=object-size... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=object-size"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=object-size"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5504,6 +5533,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5518,6 +5548,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=float-divide-by-zero... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=float-divide-by-zero"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=float-divide-by-zero"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5549,6 +5581,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5563,6 +5596,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=float-cast-overflow... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=float-cast-overflow"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=float-cast-overflow"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5594,6 +5629,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5608,6 +5644,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=nonnull-attribute... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=nonnull-attribute"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=nonnull-attribute"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5639,6 +5677,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5653,6 +5692,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=returns-nonnull-attribute... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=returns-nonnull-attribute"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=returns-nonnull-attribute"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5684,6 +5725,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5698,6 +5740,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=bool... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=bool"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=bool"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5729,6 +5773,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5743,6 +5788,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=enum... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=enum"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=enum"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5774,6 +5821,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
@@ -5788,6 +5836,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo_n "checking whether $CC supports -fsanitize=vptr... " >&6; }
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=vptr"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=vptr"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo;
@@ -5819,6 +5869,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
fi
diff --git a/configure.in b/configure.in
index f8a3fa639..9497ce6bc 100644
--- a/configure.in
+++ b/configure.in
@@ -627,6 +627,8 @@ AC_DEFUN(AC_CHECK_SANITIZER_FLAG,
AC_MSG_CHECKING([whether $CC supports -fsanitize=$1])
OLD_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fsanitize=$1"
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -fsanitize=$1"
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([int foo;])],
[
@@ -645,12 +647,14 @@ AC_DEFUN(AC_CHECK_SANITIZER_FLAG,
[
AC_MSG_RESULT([no])
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
]
)
],
[
AC_MSG_RESULT([guessing no])
CFLAGS="$OLD_CFLAGS"
+ LDFLAGS="$OLD_LDFLAGS"
]
)
]
@@ -677,7 +681,7 @@ if test "$enable_sanitize" != "no" ; then
AC_CHECK_SANITIZER_FLAG(nonnull-attribute)
AC_CHECK_SANITIZER_FLAG(returns-nonnull-attribute)
AC_CHECK_SANITIZER_FLAG(bool)
- AC_CHECK_SANITIZER_FLAG(enum, sanitize-undefined-trap-on-error)
+ AC_CHECK_SANITIZER_FLAG(enum)
AC_CHECK_SANITIZER_FLAG(vptr)
fi
fi