From 37acd20e44d03b0ec91b57f3a0d74e36ef34b18f Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Wed, 1 Sep 2021 09:46:58 +0200 Subject: [PATCH] configure: add sanitizer flags to LDFLAGS as well Signed-off-by: Christian Brauner --- configure.ac | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure.ac b/configure.ac index 0e4cbf92d..95da6bef7 100644 --- a/configure.ac +++ b/configure.ac @@ -479,6 +479,11 @@ if test "x$enable_sanitizers" = "xyes"; then -fno-omit-frame-pointer]) AC_SUBST(AM_CFLAGS) + CC_CHECK_FLAGS_APPEND([AM_LDFLAGS],[LDFLAGS],[ \ + -fsanitize=address \ + -fsanitize=undefined]) + AC_SUBST(AM_LDFLAGS) + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no])