diff --git a/Makefile.am b/Makefile.am index e45e64d..41f206f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -101,12 +101,12 @@ check_DATA = # Flags to use when compiling test programs. libbacktrace_TEST_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) -g -if HAVE_DSYMUTIL +if USE_DSYMUTIL %.dSYM: % $(DSYMUTIL) $< -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL if NATIVE check_LTLIBRARIES = libbacktrace_alloc.la @@ -238,9 +238,9 @@ allocfail.sh: allocfail TESTS += allocfail.sh -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += allocfail.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL if HAVE_ELF if HAVE_OBJCOPY_DEBUGLINK @@ -274,9 +274,9 @@ btest_LDADD = libbacktrace.la BUILDTESTS += btest -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += btest.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL if HAVE_ELF @@ -294,9 +294,9 @@ btest_alloc_LDADD = libbacktrace_alloc.la BUILDTESTS += btest_alloc -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += btest_alloc.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL if HAVE_DWZ @@ -324,9 +324,9 @@ stest_LDADD = libbacktrace.la BUILDTESTS += stest -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += stest.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL stest_alloc_SOURCES = $(stest_SOURCES) stest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS) @@ -334,9 +334,9 @@ stest_alloc_LDADD = libbacktrace_alloc.la BUILDTESTS += stest_alloc -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += stest_alloc.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL if HAVE_ELF @@ -367,17 +367,17 @@ edtest_LDADD = libbacktrace.la BUILDTESTS += edtest -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += edtest.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL edtest_alloc_SOURCES = $(edtest_SOURCES) edtest_alloc_CFLAGS = $(libbacktrace_TEST_CFLAGS) edtest_alloc_LDADD = libbacktrace_alloc.la -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += edtest_alloc.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL BUILDTESTS += edtest_alloc @@ -395,9 +395,9 @@ ttest_SOURCES = ttest.c testlib.c ttest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -pthread ttest_LDADD = libbacktrace.la -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += ttest.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL BUILDTESTS += ttest_alloc @@ -405,9 +405,9 @@ ttest_alloc_SOURCES = $(ttest_SOURCES) ttest_alloc_CFLAGS = $(ttest_CFLAGS) ttest_alloc_LDADD = libbacktrace_alloc.la -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += ttest_alloc.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL endif HAVE_PTHREAD @@ -463,9 +463,9 @@ dwarf5_LDADD = libbacktrace.la BUILDTESTS += dwarf5 -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += dwarf5.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL dwarf5_alloc_SOURCES = $(dwarf5_SOURCES) dwarf5_alloc_CFLAGS = $(dwarf5_CFLAGS) @@ -473,9 +473,9 @@ dwarf5_alloc_LDADD = libbacktrace_alloc.la BUILDTESTS += dwarf5_alloc -if HAVE_DSYMUTIL +if USE_DSYMUTIL check_DATA += dwarf5_alloc.dSYM -endif HAVE_DSYMUTIL +endif USE_DSYMUTIL endif diff --git a/Makefile.in b/Makefile.in index 9241b27..b3b5600 100644 --- a/Makefile.in +++ b/Makefile.in @@ -132,10 +132,10 @@ TESTS = $(am__append_4) $(am__append_7) $(am__append_9) \ @NATIVE_TRUE@ test_unknown unittest unittest_alloc btest @NATIVE_TRUE@am__append_3 = allocfail @NATIVE_TRUE@am__append_4 = allocfail.sh -@HAVE_DSYMUTIL_TRUE@@NATIVE_TRUE@am__append_5 = allocfail.dSYM \ -@HAVE_DSYMUTIL_TRUE@@NATIVE_TRUE@ btest.dSYM btest_alloc.dSYM \ -@HAVE_DSYMUTIL_TRUE@@NATIVE_TRUE@ stest.dSYM stest_alloc.dSYM \ -@HAVE_DSYMUTIL_TRUE@@NATIVE_TRUE@ edtest.dSYM edtest_alloc.dSYM +@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_5 = allocfail.dSYM \ +@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ btest.dSYM btest_alloc.dSYM \ +@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ stest.dSYM stest_alloc.dSYM \ +@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ edtest.dSYM edtest_alloc.dSYM @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_6 = b2test @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_7 = b2test_buildid @HAVE_DWZ_TRUE@@HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_8 = b3test @@ -149,15 +149,17 @@ TESTS = $(am__append_4) $(am__append_7) $(am__append_9) \ @HAVE_ELF_TRUE@@NATIVE_TRUE@am__append_16 = ztest ztest_alloc @NATIVE_TRUE@am__append_17 = edtest edtest_alloc @HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_18 = ttest ttest_alloc -@HAVE_DSYMUTIL_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@am__append_19 = ttest.dSYM \ -@HAVE_DSYMUTIL_TRUE@@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@ ttest_alloc.dSYM +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_19 = \ +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ ttest.dSYM \ +@HAVE_PTHREAD_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ ttest_alloc.dSYM @HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@am__append_20 = btest_gnudebuglink @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@am__append_21 = ctestg ctesta \ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ ctestg_alloc \ @HAVE_COMPRESSED_DEBUG_TRUE@@NATIVE_TRUE@ ctesta_alloc @HAVE_DWARF5_TRUE@@NATIVE_TRUE@am__append_22 = dwarf5 dwarf5_alloc -@HAVE_DSYMUTIL_TRUE@@HAVE_DWARF5_TRUE@@NATIVE_TRUE@am__append_23 = dwarf5.dSYM \ -@HAVE_DSYMUTIL_TRUE@@HAVE_DWARF5_TRUE@@NATIVE_TRUE@ dwarf5_alloc.dSYM +@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@am__append_23 = \ +@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ dwarf5.dSYM \ +@HAVE_DWARF5_TRUE@@NATIVE_TRUE@@USE_DSYMUTIL_TRUE@ dwarf5_alloc.dSYM @NATIVE_TRUE@am__append_24 = mtest @HAVE_MINIDEBUG_TRUE@@NATIVE_TRUE@am__append_25 = mtest_minidebug @HAVE_ELF_TRUE@@HAVE_LIBLZMA_TRUE@am__append_26 = -llzma @@ -2418,8 +2420,8 @@ uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES .PRECIOUS: Makefile -@HAVE_DSYMUTIL_TRUE@%.dSYM: % -@HAVE_DSYMUTIL_TRUE@ $(DSYMUTIL) $< +@USE_DSYMUTIL_TRUE@%.dSYM: % +@USE_DSYMUTIL_TRUE@ $(DSYMUTIL) $< @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@elf_for_test.c: elf.c @HAVE_ELF_TRUE@@HAVE_OBJCOPY_DEBUGLINK_TRUE@@NATIVE_TRUE@ SEARCH='^#define SYSTEM_BUILD_ID_DIR.*$$'; \ diff --git a/configure b/configure index e9a2e4c..63fc1e5 100755 --- a/configure +++ b/configure @@ -645,8 +645,8 @@ COMM HAVE_XZ_FALSE HAVE_XZ_TRUE XZ -HAVE_DSYMUTIL_FALSE -HAVE_DSYMUTIL_TRUE +USE_DSYMUTIL_FALSE +USE_DSYMUTIL_TRUE HAVE_OBJCOPY_DEBUGLINK_FALSE HAVE_OBJCOPY_DEBUGLINK_TRUE READELF @@ -12947,12 +12947,12 @@ $as_echo "no" >&6; } fi - if test -n "${DSYMUTIL}"; then - HAVE_DSYMUTIL_TRUE= - HAVE_DSYMUTIL_FALSE='#' + if test -n "${DSYMUTIL}" -a "$FORMAT_FILE" = "macho.lo"; then + USE_DSYMUTIL_TRUE= + USE_DSYMUTIL_FALSE='#' else - HAVE_DSYMUTIL_TRUE='#' - HAVE_DSYMUTIL_FALSE= + USE_DSYMUTIL_TRUE='#' + USE_DSYMUTIL_FALSE= fi @@ -13358,8 +13358,8 @@ if test -z "${HAVE_OBJCOPY_DEBUGLINK_TRUE}" && test -z "${HAVE_OBJCOPY_DEBUGLINK as_fn_error $? "conditional \"HAVE_OBJCOPY_DEBUGLINK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_DSYMUTIL_TRUE}" && test -z "${HAVE_DSYMUTIL_FALSE}"; then - as_fn_error $? "conditional \"HAVE_DSYMUTIL\" was never defined. +if test -z "${USE_DSYMUTIL_TRUE}" && test -z "${USE_DSYMUTIL_FALSE}"; then + as_fn_error $? "conditional \"USE_DSYMUTIL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XZ_TRUE}" && test -z "${HAVE_XZ_FALSE}"; then diff --git a/configure.ac b/configure.ac index 0c71220..057893a 100644 --- a/configure.ac +++ b/configure.ac @@ -506,7 +506,7 @@ AM_CONDITIONAL(HAVE_OBJCOPY_DEBUGLINK, test "$libbacktrace_cv_objcopy_debuglink" AC_ARG_VAR(DSYMUTIL, [location of dsymutil]) AC_CHECK_PROG(DSYMUTIL, dsymutil, dsymutil) -AM_CONDITIONAL(HAVE_DSYMUTIL, test -n "${DSYMUTIL}") +AM_CONDITIONAL(USE_DSYMUTIL, test -n "${DSYMUTIL}" -a "$FORMAT_FILE" = "macho.lo") AC_ARG_VAR(NM, [location of nm]) AC_CHECK_PROG(NM, nm, nm)