From: Tom de Vries Date: Fri, 25 Jan 2019 14:39:47 +0000 (+0000) Subject: [libbacktrace] Rename dtest to btest_gnudebuglink X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37ab491dcee76e83ce32506632810b04a6045d5e;p=gcc.git [libbacktrace] Rename dtest to btest_gnudebuglink Create a pattern rule for copying an existing test-case, separating out the debug information into a .debug file, and referencing the .debug file from the copied test-case using a .gnu_debuglink. 2019-01-25 Tom de Vries * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule. (TESTS): Rename dtest to btest_gnudebuglink. * Makefile.in: Regenerate. From-SVN: r268268 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 1c6b1bd5454..4a6a1656bbb 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,9 @@ +2019-01-25 Tom de Vries + + * Makefile.am: Rewrite dtest rule into "%_gnudebuglink" pattern rule. + (TESTS): Rename dtest to btest_gnudebuglink. + * Makefile.in: Regenerate. + 2019-01-23 Tom de Vries * dwarf.c (struct unit): Use size_t for low_offset/high_offset fields. diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am index bf90ebdb2d5..2f1d9af89c3 100644 --- a/libbacktrace/Makefile.am +++ b/libbacktrace/Makefile.am @@ -255,11 +255,11 @@ endif HAVE_PTHREAD if HAVE_OBJCOPY_DEBUGLINK -TESTS += dtest +TESTS += btest_gnudebuglink -dtest: btest - $(OBJCOPY) --only-keep-debug btest btest.debug - $(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug btest dtest +%_gnudebuglink: % + $(OBJCOPY) --only-keep-debug $< $@.debug + $(OBJCOPY) --strip-debug --add-gnu-debuglink=$@.debug $< $@ endif HAVE_OBJCOPY_DEBUGLINK diff --git a/libbacktrace/Makefile.in b/libbacktrace/Makefile.in index d55e0501171..0b73e3d6981 100644 --- a/libbacktrace/Makefile.in +++ b/libbacktrace/Makefile.in @@ -130,7 +130,7 @@ check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) @HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_4 = -lz @HAVE_ZLIB_TRUE@@NATIVE_TRUE@am__append_5 = -lz @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_6 = ttest ttest_alloc -@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_7 = dtest +@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_7 = btest_gnudebuglink @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_8 = ctestg ctesta \ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ ctestg_alloc \ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ ctesta_alloc @@ -1585,9 +1585,9 @@ btest_dwz.log: btest_dwz --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -dtest.log: dtest - @p='dtest'; \ - b='dtest'; \ +btest_gnudebuglink.log: btest_gnudebuglink + @p='btest_gnudebuglink'; \ + b='btest_gnudebuglink'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ @@ -1767,9 +1767,9 @@ uninstall-am: @NATIVE_TRUE@ $(SHELL) $(srcdir)/../move-if-change tmp-edtest2_build.c edtest2_build.c @NATIVE_TRUE@ echo timestamp > $@ -@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@dtest: btest -@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --only-keep-debug btest btest.debug -@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --strip-debug --add-gnu-debuglink=btest.debug btest dtest +@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@%_gnudebuglink: % +@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --only-keep-debug $< $@.debug +@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ $(OBJCOPY) --strip-debug --add-gnu-debuglink=$@.debug $< $@ alloc.lo: config.h backtrace.h internal.h backtrace.lo: config.h backtrace.h internal.h btest.lo: (INCDIR)/filenames.h backtrace.h backtrace-supported.h