Skip to content

Commit

Permalink
libbacktrace: only run dsymutil with Mach-O
Browse files Browse the repository at this point in the history
libbacktrace/ChangeLog:
	PR libbacktrace/97227
	* configure.ac (USE_DSYMUTIL): Define instead of HAVE_DSYMUTIL.
	* Makefile.am: Change all uses of HAVE_DSYMUTIL to USE_DSYMUTIL.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
  • Loading branch information
ianlancetaylor committed Sep 28, 2020
1 parent 95e8e96 commit 1286f69
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 44 deletions.
48 changes: 24 additions & 24 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand Down Expand Up @@ -324,19 +324,19 @@ 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)
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

Expand Down Expand Up @@ -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

Expand All @@ -395,19 +395,19 @@ 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

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

Expand Down Expand Up @@ -463,19 +463,19 @@ 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)
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

Expand Down
22 changes: 12 additions & 10 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.*$$'; \
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1286f69

Please sign in to comment.