forked from pool/elfutils
d6b41dd3c2
- Update to version 0.180: elflint: Allow SHF_EXCLUDE as generic section flag when --gnu is given. libdw, readelf: Handle GCC LTO .gnu.debuglto_ prefix. libdw: Use correct CU to resolve file names in dwarf_decl_file. libdwfl: Handle debugaltlink in dwfl_standard_find_debuginfo. size: Also obey radix printing for bsd format. nm: Explicitly print weak 'V' or 'T' and common 'C' symbols. - Add 0001-tests-Add-GCOV-flags-when-necessary.patch in order to fix an unresolved symbol. - Enable LTO: boo#1138796 by adding -flto-partition=none and -Wno-error=stack-usage. - Update to version 0.180: elflint: Allow SHF_EXCLUDE as generic section flag when --gnu is given. libdw, readelf: Handle GCC LTO .gnu.debuglto_ prefix. libdw: Use correct CU to resolve file names in dwarf_decl_file. libdwfl: Handle debugaltlink in dwfl_standard_find_debuginfo. size: Also obey radix printing for bsd format. nm: Explicitly print weak 'V' or 'T' and common 'C' symbols. - Add 0001-tests-Add-GCOV-flags-when-necessary.patch in order to fix an unresolved symbol. - Enable LTO: boo#1138796 by adding -flto-partition=none and -Wno-error=stack-usage. OBS-URL: https://build.opensuse.org/request/show/814087 OBS-URL: https://build.opensuse.org/package/show/Base:System/elfutils?expand=0&rev=156
55 lines
1.7 KiB
Diff
55 lines
1.7 KiB
Diff
From 3eaa4421b2422452b40547aab3e8da0749990ef9 Mon Sep 17 00:00:00 2001
|
|
From: Mark Wielaard <mark@klomp.org>
|
|
Date: Thu, 11 Jun 2020 19:07:28 +0200
|
|
Subject: [PATCH] tests: Add GCOV flags when necessary.
|
|
|
|
The nlist-test has a special compile rule, make sure it gets the
|
|
GCOV flags when configuring with --enable-gcov.
|
|
|
|
Signed-off-by: Mark Wielaard <mark@klomp.org>
|
|
---
|
|
tests/ChangeLog | 4 ++++
|
|
tests/Makefile.am | 8 +++++++-
|
|
2 files changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/tests/ChangeLog b/tests/ChangeLog
|
|
index 99f9da9d..e5d9196b 100644
|
|
--- a/tests/ChangeLog
|
|
+++ b/tests/ChangeLog
|
|
@@ -1,3 +1,7 @@
|
|
+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.
|
|
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
|
index 7db7db16..53dd70a7 100644
|
|
--- a/tests/Makefile.am
|
|
+++ b/tests/Makefile.am
|
|
@@ -80,13 +80,19 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c
|
|
$(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 \
|
|
--
|
|
2.26.2
|
|
|