[PATCH] tests: Build test-nlist with minimal CFLAGS to guarantee symbol order.
Mark Wielaard
mark@klomp.org
Fri Apr 17 10:22:39 GMT 2020
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.
Signed-off-by: Mark Wielaard <mark@klomp.org>
---
tests/ChangeLog | 5 +++++
tests/Makefile.am | 9 +++++++++
2 files changed, 14 insertions(+)
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 96e0642a..886a3efb 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-17 Mark Wielaard <mark@klomp.org>
+
+ * Makefile.am (test-nlist$): New goal with minimal CFLAGS.
+ (test_nlist_CFLAGS): New variable.
+
2020-03-28 Frank Ch. Eigler <fche@redhat.com>
* run-debuginfod-find.sh: Test timestamps of archive-origin files.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 40b1c001..d173d547 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -80,6 +80,14 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c
$(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
-o $@ $<
+# 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 $@ $<
+
TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
update1 update2 update3 update4 \
run-show-die-info.sh run-get-files.sh run-get-lines.sh \
@@ -557,6 +565,7 @@ scnnames_LDADD = $(libelf)
sectiondump_LDADD = $(libelf)
showptable_LDADD = $(libelf)
hash_LDADD = $(libelf)
+test_nlist_CFLAGS =-g -O0
test_nlist_LDADD = $(libelf)
msg_tst_LDADD = $(libelf)
newscn_LDADD = $(libelf)
--
2.18.2
More information about the Elfutils-devel
mailing list