[libbacktrace] Require dwz for b3test_dwz_buildid
authorTom de Vries <tdevries@suse.de>
Tue, 26 Feb 2019 07:54:57 +0000 (07:54 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 26 Feb 2019 07:54:57 +0000 (07:54 +0000)
If dwz is not available, then the libbacktrace test b3test_dwz_buildid fails
like this:
...
gmake[4]: *** No rule to make target 'b3test_dwz_buildid'
...

Fix this by guarding the test with HAVE_DWZ.

Tested on x86_64 with and without dwz installed.

2019-02-26  Tom de Vries  <tdevries@suse.de>

* Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
* Makefile.in: Regenerate.

From-SVN: r269204

libbacktrace/ChangeLog
libbacktrace/Makefile.am
libbacktrace/Makefile.in

index e29c41f78ed2cb5a357dd3bc97060ee898407d6a..bfd828ec3e7c846d109261180abfd79fb97a4b26 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-26  Tom de Vries  <tdevries@suse.de>
+
+       * Makefile.am (TESTS): Only add b3test_dwz_buildid if HAVE_DWZ.
+       * Makefile.in: Regenerate.
+
 2019-02-12  Tom de Vries  <tdevries@suse.de>
 
        PR libbacktrace/81983
index 3b5f6e374d81c2106320ccc35b813d1ac71b5cdd..7ddee4962ec0d1fdc53f3adf5871eb33fbb4af7e 100644 (file)
@@ -205,6 +205,8 @@ b2test_LDADD = libbacktrace_elf_for_test.la
 check_PROGRAMS += b2test
 TESTS += b2test_buildid
 
+if HAVE_DWZ
+
 b3test_SOURCES = $(btest_SOURCES)
 b3test_CFLAGS = $(btest_CFLAGS)
 b3test_LDFLAGS = -Wl,--build-id
@@ -213,6 +215,8 @@ b3test_LDADD = libbacktrace_elf_for_test.la
 check_PROGRAMS += b3test
 TESTS += b3test_dwz_buildid
 
+endif HAVE_DWZ
+
 endif HAVE_OBJCOPY_DEBUGLINK
 endif HAVE_ELF
 
index f60aca6463aa0ba8ce33f7b6f1f1987538be323a..a896a26dff804761678bbd6db2acfa3bc4843193 100644 (file)
@@ -120,29 +120,31 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 target_triplet = @target@
-check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_8)
-TESTS = $(am__append_4) $(am__append_6) $(am__append_9) \
-       $(am__append_10) $(am__append_14) $(am__EXEEXT_8)
+check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+       $(am__EXEEXT_9)
+TESTS = $(am__append_4) $(am__append_6) $(am__append_8) \
+       $(am__append_11) $(am__append_12) $(am__append_16) \
+       $(am__EXEEXT_9)
 @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_1 = libbacktrace_elf_for_test.la
 @NATIVE_TRUE@am__append_2 = test_elf test_xcoff_32 test_xcoff_64 \
 @NATIVE_TRUE@  test_pecoff test_unknown unittest unittest_alloc \
 @NATIVE_TRUE@  btest
 @NATIVE_TRUE@am__append_3 = allocfail
 @NATIVE_TRUE@am__append_4 = allocfail.sh
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_5 = b2test \
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@      b3test
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_6 = b2test_buildid \
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@      b3test_dwz_buildid
-@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_7 = btest_lto
-@NATIVE_TRUE@am__append_8 = btest_alloc stest stest_alloc ztest \
+@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_5 = b2test
+@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_6 = b2test_buildid
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_7 = b3test
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_8 = b3test_dwz_buildid
+@HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_9 = btest_lto
+@NATIVE_TRUE@am__append_10 = btest_alloc stest stest_alloc ztest \
 @NATIVE_TRUE@  ztest_alloc edtest edtest_alloc
-@HAVE_DWZ_TRUE@@NATIVE_TRUE@am__append_9 = btest_dwz
-@HAVE_DWZ_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_10 = btest_dwz_gnudebuglink
-@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_11 = -lz
-@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_12 = -lz
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_13 = ttest ttest_alloc
-@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_14 = btest_gnudebuglink
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_15 = ctestg ctesta \
+@HAVE_DWZ_TRUE@@NATIVE_TRUE@am__append_11 = btest_dwz
+@HAVE_DWZ_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_12 = btest_dwz_gnudebuglink
+@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_13 = -lz
+@HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_14 = -lz
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_15 = ttest ttest_alloc
+@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_16 = btest_gnudebuglink
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_17 = ctestg ctesta \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctestg_alloc \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctesta_alloc
 subdir = .
@@ -201,26 +203,26 @@ libbacktrace_noformat_la_OBJECTS =  \
        $(am_libbacktrace_noformat_la_OBJECTS)
 @NATIVE_TRUE@am_libbacktrace_noformat_la_rpath =
 @NATIVE_TRUE@am__EXEEXT_1 = allocfail$(EXEEXT)
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = b2test$(EXEEXT) \
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@      b3test$(EXEEXT)
-@NATIVE_TRUE@am__EXEEXT_3 = test_elf$(EXEEXT) test_xcoff_32$(EXEEXT) \
+@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__EXEEXT_2 = b2test$(EXEEXT)
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__EXEEXT_3 = b3test$(EXEEXT)
+@NATIVE_TRUE@am__EXEEXT_4 = test_elf$(EXEEXT) test_xcoff_32$(EXEEXT) \
 @NATIVE_TRUE@  test_xcoff_64$(EXEEXT) test_pecoff$(EXEEXT) \
 @NATIVE_TRUE@  test_unknown$(EXEEXT) unittest$(EXEEXT) \
 @NATIVE_TRUE@  unittest_alloc$(EXEEXT) btest$(EXEEXT)
-@HAVE_ELF_TRUE@@NATIVE_TRUE@am__EXEEXT_4 = btest_lto$(EXEEXT)
-@NATIVE_TRUE@am__EXEEXT_5 = btest_alloc$(EXEEXT) stest$(EXEEXT) \
+@HAVE_ELF_TRUE@@NATIVE_TRUE@am__EXEEXT_5 = btest_lto$(EXEEXT)
+@NATIVE_TRUE@am__EXEEXT_6 = btest_alloc$(EXEEXT) stest$(EXEEXT) \
 @NATIVE_TRUE@  stest_alloc$(EXEEXT) ztest$(EXEEXT) \
 @NATIVE_TRUE@  ztest_alloc$(EXEEXT) edtest$(EXEEXT) \
 @NATIVE_TRUE@  edtest_alloc$(EXEEXT)
-@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_6 = ttest$(EXEEXT) \
+@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__EXEEXT_7 = ttest$(EXEEXT) \
 @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@       ttest_alloc$(EXEEXT)
-@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_7 =  \
+@HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__EXEEXT_8 =  \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctestg$(EXEEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctesta$(EXEEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctestg_alloc$(EXEEXT) \
 @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@      ctesta_alloc$(EXEEXT)
-am__EXEEXT_8 = $(am__EXEEXT_3) $(am__EXEEXT_4) $(am__EXEEXT_5) \
-       $(am__EXEEXT_6) $(am__EXEEXT_7)
+am__EXEEXT_9 = $(am__EXEEXT_4) $(am__EXEEXT_5) $(am__EXEEXT_6) \
+       $(am__EXEEXT_7) $(am__EXEEXT_8)
 @NATIVE_TRUE@am_allocfail_OBJECTS = allocfail.$(OBJEXT) \
 @NATIVE_TRUE@  testlib.$(OBJEXT)
 allocfail_OBJECTS = $(am_allocfail_OBJECTS)
@@ -236,9 +238,9 @@ b2test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(b2test_LDFLAGS) $(LDFLAGS) -o $@
 @NATIVE_TRUE@am__objects_3 = b3test-btest.$(OBJEXT) \
 @NATIVE_TRUE@  b3test-testlib.$(OBJEXT)
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am_b3test_OBJECTS = $(am__objects_3)
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am_b3test_OBJECTS = $(am__objects_3)
 b3test_OBJECTS = $(am_b3test_OBJECTS)
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_DEPENDENCIES = libbacktrace_elf_for_test.la
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_DEPENDENCIES = libbacktrace_elf_for_test.la
 b3test_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
        $(LIBTOOLFLAGS) --mode=link $(CCLD) $(b3test_CFLAGS) $(CFLAGS) \
        $(b3test_LDFLAGS) $(LDFLAGS) -o $@
@@ -843,8 +845,8 @@ libbacktrace_la_LIBADD = \
 libbacktrace_la_DEPENDENCIES = $(libbacktrace_la_LIBADD)
 
 # Add test to this variable, if you want it to be build and run.
-BUILDTESTS = $(am__append_2) $(am__append_7) $(am__append_8) \
-       $(am__append_13) $(am__append_15)
+BUILDTESTS = $(am__append_2) $(am__append_9) $(am__append_10) \
+       $(am__append_15) $(am__append_17)
 @NATIVE_TRUE@check_LTLIBRARIES = libbacktrace_alloc.la \
 @NATIVE_TRUE@  libbacktrace_noformat.la $(am__append_1) \
 @NATIVE_TRUE@  libbacktrace_instrumented_alloc.la
@@ -886,10 +888,10 @@ BUILDTESTS = $(am__append_2) $(am__append_7) $(am__append_8) \
 @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b2test_CFLAGS = $(btest_CFLAGS)
 @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b2test_LDFLAGS = -Wl,--build-id
 @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b2test_LDADD = libbacktrace_elf_for_test.la
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_SOURCES = $(btest_SOURCES)
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_CFLAGS = $(btest_CFLAGS)
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_LDFLAGS = -Wl,--build-id
-@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_LDADD = libbacktrace_elf_for_test.la
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_SOURCES = $(btest_SOURCES)
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_CFLAGS = $(btest_CFLAGS)
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_LDFLAGS = -Wl,--build-id
+@HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@b3test_LDADD = libbacktrace_elf_for_test.la
 @NATIVE_TRUE@btest_SOURCES = btest.c testlib.c
 @NATIVE_TRUE@btest_CFLAGS = $(AM_CFLAGS) -g -O
 @NATIVE_TRUE@btest_LDADD = libbacktrace.la
@@ -905,10 +907,10 @@ BUILDTESTS = $(am__append_2) $(am__append_7) $(am__append_8) \
 @NATIVE_TRUE@stest_alloc_LDADD = libbacktrace_alloc.la
 @NATIVE_TRUE@ztest_SOURCES = ztest.c testlib.c
 @NATIVE_TRUE@ztest_CFLAGS = -DSRCDIR=\"$(srcdir)\"
-@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_11) \
+@NATIVE_TRUE@ztest_LDADD = libbacktrace.la $(am__append_13) \
 @NATIVE_TRUE@  $(CLOCK_GETTIME_LINK)
 @NATIVE_TRUE@ztest_alloc_LDADD = libbacktrace_alloc.la \
-@NATIVE_TRUE@  $(am__append_12) $(CLOCK_GETTIME_LINK)
+@NATIVE_TRUE@  $(am__append_14) $(CLOCK_GETTIME_LINK)
 @NATIVE_TRUE@ztest_alloc_SOURCES = $(ztest_SOURCES)
 @NATIVE_TRUE@ztest_alloc_CFLAGS = $(ztest_CFLAGS)
 @NATIVE_TRUE@edtest_SOURCES = edtest.c edtest2_build.c testlib.c