summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2017-02-16 18:48:29 -0500
committerPaul Moore <paul@paul-moore.com>2017-02-16 18:48:29 -0500
commit6be07ffd44a573b3aefd27dcbddb6aebb31a4950 (patch)
treeaead672044e0b0745ebc9445ad65a46506cc254e
parentb3caeec32151312d62af6206f03f472a7eea1e7f (diff)
downloadlibseccomp-6be07ffd44a573b3aefd27dcbddb6aebb31a4950.tar.gz
build: restore the '-static' linker flag for the test suite
Commit a69776395367 ("build: add basic code coverage support") added support for code coverage but removed the '-static' linker flag from the test directory which makes debugging tests much more difficult. Unfortunately, we can't simply restore the '-static' linker flag as it causes problems with the code coverage tools, so make it dependent on the '--enable-code-coverage' configure flag. Signed-off-by: Paul Moore <paul@paul-moore.com> (imported from commit a90977cd9f17646280848fd2da748539f61570e1)
-rw-r--r--tests/Makefile.am8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f24b186..f81388b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,6 +18,14 @@
@CODE_COVERAGE_RULES@
+if CODE_COVERAGE_ENABLED
+DBG_STATIC =
+else
+DBG_STATIC = -static
+endif
+
+AM_LDFLAGS = ${DBG_STATIC}
+
LDADD = util.la ../src/libseccomp.la ${CODE_COVERAGE_LIBS}
check_LTLIBRARIES = util.la