summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bus/Makefile.am1
-rw-r--r--configure.ac3
-rw-r--r--dbus/Makefile.am1
-rw-r--r--test/Makefile.am7
-rw-r--r--test/name-test/Makefile.am1
-rw-r--r--tools/Makefile.am1
6 files changed, 14 insertions, 0 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am
index d7408049..fe0f92b1 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -38,6 +38,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
AM_CFLAGS = \
$(CODE_COVERAGE_CFLAGS) \
+ $(SANITIZE_CFLAGS) \
$(NULL)
EFENCE=
diff --git a/configure.ac b/configure.ac
index 5723ae48..4636062a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1224,6 +1224,9 @@ CFLAGS="$EXTRA_CFLAGS $CFLAGS"
CXXFLAGS="$EXTRA_CXXFLAGS $CXXFLAGS"
LDFLAGS="$EXTRA_LDFLAGS $LDFLAGS"
+AC_ARG_VAR([SANITIZE_CFLAGS],
+ [Extra CFLAGS for modules that are instrumented for error-checking])
+
case $host_os in
solaris*)
# Solaris' C library apparently needs these runes to be threadsafe...
diff --git a/dbus/Makefile.am b/dbus/Makefile.am
index c003b399..f9561bef 100644
--- a/dbus/Makefile.am
+++ b/dbus/Makefile.am
@@ -17,6 +17,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(CODE_COVERAGE_CFLAGS) \
+ $(SANITIZE_CFLAGS) \
$(NULL)
if HAVE_VISIBILITY
diff --git a/test/Makefile.am b/test/Makefile.am
index 2f649837..b8df15ac 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -23,6 +23,7 @@ AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
AM_CFLAGS = \
$(CODE_COVERAGE_CFLAGS) \
+ $(SANITIZE_CFLAGS) \
$(NULL)
noinst_LTLIBRARIES = libdbus-testutils.la
@@ -91,6 +92,12 @@ endif !DBUS_ENABLE_EMBEDDED_TESTS
noinst_PROGRAMS= $(TEST_BINARIES)
+# This helper is meant to crash, so if we're compiling the rest with
+# AddressSanitizer, we need to stop it from catching the SIGSEGV and
+# turning it into _exit(1); so don't give it SANITIZE_CFLAGS.
+# CODE_COVERAGE_CFLAGS are fairly pointless here, too.
+test_segfault_CFLAGS =
+
test_service_LDADD = libdbus-testutils.la
test_names_LDADD = libdbus-testutils.la
## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
diff --git a/test/name-test/Makefile.am b/test/name-test/Makefile.am
index ea63e579..280eb8ea 100644
--- a/test/name-test/Makefile.am
+++ b/test/name-test/Makefile.am
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(CODE_COVERAGE_CFLAGS) \
+ $(SANITIZE_CFLAGS) \
$(NULL)
# if assertions are enabled, improve backtraces
diff --git a/tools/Makefile.am b/tools/Makefile.am
index f3450030..85dcba64 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
AM_CFLAGS = \
$(CODE_COVERAGE_CFLAGS) \
+ $(SANITIZE_CFLAGS) \
$(NULL)
# if assertions are enabled, improve backtraces