Skip to content

Commit

Permalink
libbacktrace: test --compress-debug-sections=ARG for each ARG
Browse files Browse the repository at this point in the history
This should fix a testsuite problem with Solaris ld that supports zlib
but not zlib-gabi.

	* configure.ac: Test --compress-debug-sections=zlib-gnu and
	--compress-debug-sections=zlib-gabi separately, setting new
	automake conditionals.
	* Makefile.am (ctestg, ctestg_alloc): Only build if
	HAVE_COMPRESSED_DEBUG_ZLIB_GNU.
	(ctesta, ctesta_alloc): Only build if
	HAVE_COMPRESSED_DEBUG_ZLIB_GABI.
	(ctestzstd_alloc): New test if HAVE_COMPRESSED_DEBUG_ZSTD.
	* configure, Makefile.in: Regenerate.
  • Loading branch information
ianlancetaylor committed Apr 23, 2024
1 parent 7ead8c1 commit ae1e707
Show file tree
Hide file tree
Showing 4 changed files with 214 additions and 116 deletions.
41 changes: 25 additions & 16 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -494,19 +494,37 @@ endif HAVE_OBJCOPY_DEBUGLINK
$<
$(OBJCOPY) --strip-all $< $@

if HAVE_COMPRESSED_DEBUG
if HAVE_COMPRESSED_DEBUG_ZLIB_GNU

ctestg_SOURCES = btest.c testlib.c
ctestg_CFLAGS = $(libbacktrace_TEST_CFLAGS)
ctestg_LDFLAGS = -Wl,--compress-debug-sections=zlib-gnu $(libbacktrace_testing_ldflags)
ctestg_LDADD = libbacktrace.la

ctestg_alloc_SOURCES = $(ctestg_SOURCES)
ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
ctestg_alloc_LDFLAGS = $(ctestg_LDFLAGS) $(libbacktrace_testing_ldflags)
ctestg_alloc_LDADD = libbacktrace_alloc.la

BUILDTESTS += ctestg ctestg_alloc

endif

if HAVE_COMPRESSED_DEBUG_ZLIB_GABI

ctesta_SOURCES = btest.c testlib.c
ctesta_CFLAGS = $(libbacktrace_TEST_CFLAGS)
ctesta_LDFLAGS = -Wl,--compress-debug-sections=zlib-gabi $(libbacktrace_testing_ldflags)
ctesta_LDADD = libbacktrace.la

BUILDTESTS += ctestg ctesta
ctesta_alloc_SOURCES = $(ctesta_SOURCES)
ctesta_alloc_CFLAGS = $(ctesta_CFLAGS)
ctesta_alloc_LDFLAGS = $(ctesta_LDFLAGS) $(libbacktrace_testing_ldflags)
ctesta_alloc_LDADD = libbacktrace_alloc.la

BUILDTESTS += ctesta ctesta_alloc

endif

if HAVE_COMPRESSED_DEBUG_ZSTD

Expand All @@ -515,21 +533,12 @@ ctestzstd_CFLAGS = $(libbacktrace_TEST_CFLAGS)
ctestzstd_LDFLAGS = -Wl,--compress-debug-sections=zstd $(libbacktrace_testing_ldflags)
ctestzstd_LDADD = libbacktrace.la

BUILDTESTS += ctestzstd

endif

ctestg_alloc_SOURCES = $(ctestg_SOURCES)
ctestg_alloc_CFLAGS = $(ctestg_CFLAGS)
ctestg_alloc_LDFLAGS = $(ctestg_LDFLAGS) $(libbacktrace_testing_ldflags)
ctestg_alloc_LDADD = libbacktrace_alloc.la

ctesta_alloc_SOURCES = $(ctesta_SOURCES)
ctesta_alloc_CFLAGS = $(ctesta_CFLAGS)
ctesta_alloc_LDFLAGS = $(ctesta_LDFLAGS) $(libbacktrace_testing_ldflags)
ctesta_alloc_LDADD = libbacktrace_alloc.la
ctestzstd_alloc_SOURCES = $(ctestzstd_SOURCES)
ctestzstd_alloc_CFLAGS = $(ctestzstd_CFLAGS)
ctestzstd_alloc_LDFLAGS = $(ctestzstd_LDFLAGS) $(libbacktrace_testing_ldflags)
ctestzstd_alloc_LDADD = libbacktrace_alloc.la

BUILDTESTS += ctestg_alloc ctesta_alloc
BUILDTESTS += ctestzstd ctestzstd_alloc

endif

Expand Down
Loading

0 comments on commit ae1e707

Please sign in to comment.