+2020-06-11 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (nlist-test): Add GCOV flags when necessary.
+
2020-06-06 Mark Wielaard <mark@klomp.org>
* testfilesyms32.bz2: New test file.
$(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
-o $@ $<
+if GCOV
+GCOV_FLAGS=-fprofile-arcs -ftest-coverage
+else
+GCOV_FLAGS=
+endif
+
# test_nlist checks its own symbol table, and expects various symbols
# to be in the order as specified in the source file. Explicitly set
# minimal CFLAGS
test-nlist$(EXEEXT): test-nlist.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) \
- $(test_nlist_CFLAGS) $(test_nlist_LDADD) -o $@ $<
+ $(test_nlist_CFLAGS) $(GCOV_FLAGS) -o $@ $< $(test_nlist_LDADD)
TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
update1 update2 update3 update4 \