summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2019-04-15 13:01:21 +0200
committerKarel Zak2019-04-15 13:01:21 +0200
commitef61c093d31ee07a8e5df3125ea3418f49f46538 (patch)
treeb16e6b3cccc6aaad5b3bf690f595d5bdbf30eadc
parenttests: ignore errors with enabled ASAN in python bindings (diff)
downloadkernel-qcow2-util-linux-ef61c093d31ee07a8e5df3125ea3418f49f46538.tar.gz
kernel-qcow2-util-linux-ef61c093d31ee07a8e5df3125ea3418f49f46538.tar.xz
kernel-qcow2-util-linux-ef61c093d31ee07a8e5df3125ea3418f49f46538.zip
build-sys: add ASAN_LDFLAGS
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac3
2 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.am b/Makefile.am
index c9ef61226..0ae085d9a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,7 +4,7 @@ AM_CPPFLAGS = \
-DLOCALEDIR=\"$(localedir)\" \
-D_PATH_RUNSTATEDIR=\"${runstatedir}\"
AM_CFLAGS = -fsigned-char $(WARN_CFLAGS)
-AM_LDFLAGS =
+AM_LDFLAGS = $(ASAN_LDFLAGS)
# Add gettext stuff to the global LDADD for systems with separate libintl
# library. The LTLIBINTL is generated by AM_GNU_GETTEXT macro.
diff --git a/configure.ac b/configure.ac
index bbf07db3f..cb72f42bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,9 +155,10 @@ AC_ARG_ENABLE([asan],
)
AS_IF([test "x$enable_asan" = xyes], [
UL_WARN_ADD([-fsanitize=address])
+ ASAN_LDFLAGS="-fsanitize=address"
])
-
+AC_SUBST([ASAN_LDFLAGS])
dnl libtool-2
LT_INIT