From: Mark Wielaard Date: Fri, 17 Apr 2020 10:21:46 +0000 (+0200) Subject: tests: Build test-nlist with minimal CFLAGS to guarantee symbol order. X-Git-Tag: elfutils-0.180~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51cfbaabefd6d5ebdd7513b876daf78d07470f8c;p=thirdparty%2Felfutils.git tests: Build test-nlist with minimal CFLAGS to guarantee symbol order. 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 --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 96e0642a2..886a3efba 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2020-04-17 Mark Wielaard + + * Makefile.am (test-nlist$): New goal with minimal CFLAGS. + (test_nlist_CFLAGS): New variable. + 2020-03-28 Frank Ch. Eigler * run-debuginfod-find.sh: Test timestamps of archive-origin files. diff --git a/tests/Makefile.am b/tests/Makefile.am index 40b1c0011..d173d547e 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)