From 6be07ffd44a573b3aefd27dcbddb6aebb31a4950 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Thu, 16 Feb 2017 18:48:29 -0500 Subject: 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 (imported from commit a90977cd9f17646280848fd2da748539f61570e1) --- tests/Makefile.am | 8 ++++++++ 1 file changed, 8 insertions(+) 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 -- cgit v1.2.1