Skip to content

Commit 77bcaa9

Browse files
libbacktrace: support MiniDebugInfo
libbacktrace/ChangeLog: PR libbacktrace/93608 Add support for MiniDebugInfo. * elf.c (struct elf_view): Define. Replace most uses of backtrace_view with elf_view. (elf_get_view): New static functions. Replace most calls of backtrace_get_view with elf_get_view. (elf_release_view): New static functions. Replace most calls of backtrace_release_view with elf_release_view. (elf_uncompress_failed): Rename from elf_zlib_failed. Change all callers. (LZMA_STATES, LZMA_POS_STATES, LZMA_DIST_STATES): Define. (LZMA_DIST_SLOTS, LZMA_DIST_MODEL_START): Define. (LZMA_DIST_MODEL_END, LZMA_FULL_DISTANCES): Define. (LZMA_ALIGN_SIZE, LZMA_LEN_LOW_SYMBOLS): Define. (LZMA_LEN_MID_SYMBOLS, LZMA_LEN_HIGH_SYMBOLS): Define. (LZMA_LITERAL_CODERS_MAX, LZMA_LITERAL_CODER_SIZE): Define. (LZMA_PROB_IS_MATCH_LEN, LZMA_PROB_IS_REP_LEN): Define. (LZMA_PROB_IS_REP0_LEN, LZMA_PROB_IS_REP1_LEN): Define. (LZMA_PROB_IS_REP2_LEN, LZMA_PROB_IS_REP0_LONG_LEN): Define. (LZMA_PROB_DIST_SLOT_LEN, LZMA_PROB_DIST_SPECIAL_LEN): Define. (LZMA_PROB_DIST_ALIGN_LEN): Define. (LZMA_PROB_MATCH_LEN_CHOICE_LEN): Define. (LZMA_PROB_MATCH_LEN_CHOICE2_LEN): Define. (LZMA_PROB_MATCH_LEN_LOW_LEN): Define. (LZMA_PROB_MATCH_LEN_MID_LEN): Define. (LZMA_PROB_MATCH_LEN_HIGH_LEN): Define. (LZMA_PROB_REP_LEN_CHOICE_LEN): Define. (LZMA_PROB_REP_LEN_CHOICE2_LEN): Define. (LZMA_PROB_REP_LEN_LOW_LEN): Define. (LZMA_PROB_REP_LEN_MID_LEN): Define. (LZMA_PROB_REP_LEN_HIGH_LEN): Define. (LZMA_PROB_LITERAL_LEN): Define. (LZMA_PROB_IS_MATCH_OFFSET, LZMA_PROB_IS_REP_OFFSET): Define. (LZMA_PROB_IS_REP0_OFFSET, LZMA_PROB_IS_REP1_OFFSET): Define. (LZMA_PROB_IS_REP2_OFFSET): Define. (LZMA_PROB_IS_REP0_LONG_OFFSET): Define. (LZMA_PROB_DIST_SLOT_OFFSET): Define. (LZMA_PROB_DIST_SPECIAL_OFFSET): Define. (LZMA_PROB_DIST_ALIGN_OFFSET): Define. (LZMA_PROB_MATCH_LEN_CHOICE_OFFSET): Define. (LZMA_PROB_MATCH_LEN_CHOICE2_OFFSET): Define. (LZMA_PROB_MATCH_LEN_LOW_OFFSET): Define. (LZMA_PROB_MATCH_LEN_MID_OFFSET): Define. (LZMA_PROB_MATCH_LEN_HIGH_OFFSET): Define. (LZMA_PROB_REP_LEN_CHOICE_OFFSET): Define. (LZMA_PROB_REP_LEN_CHOICE2_OFFSET): Define. (LZMA_PROB_REP_LEN_LOW_OFFSET): Define. (LZMA_PROB_REP_LEN_MID_OFFSET): Define. (LZMA_PROB_REP_LEN_HIGH_OFFSET): Define. (LZMA_PROB_LITERAL_OFFSET): Define. (LZMA_PROB_TOTAL_COUNT): Define. (LZMA_IS_MATCH, LZMA_IS_REP, LZMA_IS_REP0): Define. (LZMA_IS_REP1, LZMA_IS_REP2, LZMA_IS_REP0_LONG): Define. (LZMA_DIST_SLOT, LZMA_DIST_SPECIAL, LZMA_DIST_ALIGN): Define. (LZMA_MATCH_LEN_CHOICE, LZMA_MATCH_LEN_CHOICE2): Define. (LZMA_MATCH_LEN_LOW, LZMA_MATCH_LEN_MID): Define. (LZMA_MATCH_LEN_HIGH, LZMA_REP_LEN_CHOICE): Define. (LZMA_REP_LEN_CHOICE2, LZMA_REP_LEN_LOW): Define. (LZMA_REP_LEN_MID, LZMA_REP_LEN_HIGH, LZMA_LITERAL): Define. (elf_lzma_varint): New static function. (elf_lzma_range_normalize): New static function. (elf_lzma_bit, elf_lzma_integer): New static functions. (elf_lzma_reverse_integer): New static function. (elf_lzma_len, elf_uncompress_lzma_block): New static functions. (elf_uncompress_lzma): New static function. (backtrace_uncompress_lzma): New function. (elf_add): Add memory and memory_size parameters. Change all callers. Look for .gnu_debugdata section, and, if found, decompress it and use it for symbols and debug info. Permit the descriptor parameter to be -1. * internal.h (backtrace_uncompress_lzma): Declare. * mtest.c: New file. * xztest.c: New file. * configure.ac: Check for nm, xz, and comm programs. Check for liblzma library. (HAVE_MINIDEBUG): Define. * Makefile.am (mtest_SOURCES): Define. (mtest_CFLAGS, mtest_LDADD): Define. (TESTS): Add mtest_minidebug if HAVE_MINIDEBUG. (%_minidebug): New pattern rule, if HAVE_MINIDEBUG. (xztest_SOURCES, xztest_CFLAGS, xztest_LDADD): Define. (xztest_alloc_SOURCES, xztest_alloc_CFLAGS): Define (xztest_alloc_LDADD): Define. (BUILDTESTS): Add mtest, xztest, xztest_alloc. (CLEANFILES): Add files created by minidebug pattern. (btest.lo): Correct INCDIR reference. (mtest.lo, xztest.lo, ztest.lo): New targets. * configure: Regenerate. * config.h.in: Regenerate. * Makefile.in: Regenerate. Close #38
1 parent 2f5efbf commit 77bcaa9

File tree

9 files changed

+2911
-164
lines changed

9 files changed

+2911
-164
lines changed

Makefile.am

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,13 +479,61 @@ endif HAVE_DSYMUTIL
479479

480480
endif
481481

482+
mtest_SOURCES = mtest.c testlib.c
483+
mtest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -O
484+
mtest_LDADD = libbacktrace.la
485+
486+
BUILDTESTS += mtest
487+
488+
if HAVE_MINIDEBUG
489+
490+
TESTS += mtest_minidebug
491+
492+
%_minidebug: %
493+
$(NM) -D $< -P --defined-only | $(AWK) '{ print $$1 }' | sort > $<.dsyms
494+
$(NM) $< -P --defined-only | $(AWK) '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > $<.fsyms
495+
$(COMM) -13 $<.dsyms $<.fsyms > $<.keepsyms
496+
$(OBJCOPY) --only-keep-debug $< $<.dbg
497+
$(OBJCOPY) -S --remove-section .gdb_index --remove-section .comment --keep-symbols=$<.keepsyms $<.dbg $<.mdbg
498+
$(OBJCOPY) --strip-all --remove-section ..comment $< $<.strip
499+
rm -f $<.mdbg.xz
500+
$(XZ) $<.mdbg
501+
$(OBJCOPY) --add-section .gnu_debugdata=$<.mdbg.xz $<.strip
502+
mv $<.strip $@
503+
504+
endif HAVE_MINIDEBUG
505+
482506
endif NATIVE
483507

508+
if HAVE_ELF
509+
510+
xztest_SOURCES = xztest.c testlib.c
511+
xztest_CFLAGS = $(libbacktrace_TEST_CFLAGS) -DSRCDIR=\"$(srcdir)\"
512+
xztest_LDADD = libbacktrace.la
513+
514+
xztest_alloc_SOURCES = $(xztest_SOURCES)
515+
xztest_alloc_CFLAGS = $(xztest_CFLAGS)
516+
xztest_alloc_LDADD = libbacktrace_alloc.la
517+
518+
if HAVE_LIBLZMA
519+
xztest_LDADD += -llzma
520+
xztest_alloc_LDADD += -llzma
521+
endif
522+
523+
xztest_LDADD += $(CLOCK_GETTIME_LINK)
524+
xztest_alloc_LDADD += $(CLOCK_GETTIME_LINK)
525+
526+
BUILDTESTS += xztest xztest_alloc
527+
528+
endif HAVE_ELF
529+
484530
check_PROGRAMS += $(BUILDTESTS)
485531

486532
TESTS += $(BUILDTESTS)
487533

488-
CLEANFILES = $(TESTS) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build
534+
CLEANFILES = \
535+
$(TESTS) *.debug elf_for_test.c edtest2_build.c gen_edtest2_build \
536+
*.dsyms *.fsyms *.keepsyms *.dbg *.mdbg *.mdbg.xz *.strip
489537

490538
clean-local:
491539
-rm -rf usr
@@ -511,6 +559,7 @@ fileline.lo: config.h backtrace.h internal.h
511559
macho.lo: config.h backtrace.h internal.h
512560
mmap.lo: config.h backtrace.h internal.h
513561
mmapio.lo: config.h backtrace.h internal.h
562+
mtest.lo: backtrace.h backtrace-supported.h
514563
nounwind.lo: config.h internal.h
515564
pecoff.lo: config.h backtrace.h internal.h
516565
posix.lo: config.h backtrace.h internal.h
@@ -522,4 +571,6 @@ stest.lo: config.h backtrace.h internal.h
522571
state.lo: config.h backtrace.h backtrace-supported.h internal.h
523572
unknown.lo: config.h backtrace.h internal.h
524573
xcoff.lo: config.h backtrace.h internal.h
574+
xztest.lo: config.h backtrace.h backtrace-supported.h internal.h testlib.h
575+
ztest.lo: config.h backtrace.h backtrace-supported.h internal.h testlib.h
525576

Makefile.in

Lines changed: 151 additions & 10 deletions
Large diffs are not rendered by default.

config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
<sys/sysctl.h>. */
4747
#undef HAVE_KERN_PROC_ARGS
4848

49+
/* Define if -llzma is available. */
50+
#undef HAVE_LIBLZMA
51+
4952
/* Define to 1 if you have the <link.h> header file. */
5053
#undef HAVE_LINK_H
5154

configure

Lines changed: 221 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,16 @@ LTLIBOBJS
635635
LIBOBJS
636636
NATIVE_FALSE
637637
NATIVE_TRUE
638+
HAVE_LIBLZMA_FALSE
639+
HAVE_LIBLZMA_TRUE
640+
HAVE_MINIDEBUG_FALSE
641+
HAVE_MINIDEBUG_TRUE
642+
HAVE_COMM_FALSE
643+
HAVE_COMM_TRUE
644+
COMM
645+
HAVE_XZ_FALSE
646+
HAVE_XZ_TRUE
647+
XZ
638648
HAVE_DSYMUTIL_FALSE
639649
HAVE_DSYMUTIL_TRUE
640650
HAVE_OBJCOPY_DEBUGLINK_FALSE
@@ -802,7 +812,8 @@ LIBS
802812
CPPFLAGS
803813
CPP
804814
OBJCOPY
805-
DSYMUTIL'
815+
DSYMUTIL
816+
NM'
806817

807818

808819
# Initialize some variables set by options.
@@ -1456,6 +1467,7 @@ Some influential environment variables:
14561467
CPP C preprocessor
14571468
OBJCOPY location of objcopy
14581469
DSYMUTIL location of dsymutil
1470+
NM location of nm
14591471
14601472
Use these variables to override the choices made by `configure' or to help
14611473
it to find libraries and programs with nonstandard names/locations.
@@ -11269,7 +11281,7 @@ else
1126911281
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1127011282
lt_status=$lt_dlunknown
1127111283
cat > conftest.$ac_ext <<_LT_EOF
11272-
#line 11272 "configure"
11284+
#line 11284 "configure"
1127311285
#include "confdefs.h"
1127411286
1127511287
#if HAVE_DLFCN_H
@@ -11375,7 +11387,7 @@ else
1137511387
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1137611388
lt_status=$lt_dlunknown
1137711389
cat > conftest.$ac_ext <<_LT_EOF
11378-
#line 11378 "configure"
11390+
#line 11390 "configure"
1137911391
#include "confdefs.h"
1138011392
1138111393
#if HAVE_DLFCN_H
@@ -12944,6 +12956,196 @@ else
1294412956
fi
1294512957
1294612958
12959+
12960+
# Extract the first word of "nm", so it can be a program name with args.
12961+
set dummy nm; ac_word=$2
12962+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12963+
$as_echo_n "checking for $ac_word... " >&6; }
12964+
if ${ac_cv_prog_NM+:} false; then :
12965+
$as_echo_n "(cached) " >&6
12966+
else
12967+
if test -n "$NM"; then
12968+
ac_cv_prog_NM="$NM" # Let the user override the test.
12969+
else
12970+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971+
for as_dir in $PATH
12972+
do
12973+
IFS=$as_save_IFS
12974+
test -z "$as_dir" && as_dir=.
12975+
for ac_exec_ext in '' $ac_executable_extensions; do
12976+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12977+
ac_cv_prog_NM="nm"
12978+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12979+
break 2
12980+
fi
12981+
done
12982+
done
12983+
IFS=$as_save_IFS
12984+
12985+
fi
12986+
fi
12987+
NM=$ac_cv_prog_NM
12988+
if test -n "$NM"; then
12989+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
12990+
$as_echo "$NM" >&6; }
12991+
else
12992+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993+
$as_echo "no" >&6; }
12994+
fi
12995+
12996+
12997+
12998+
# Extract the first word of "xz", so it can be a program name with args.
12999+
set dummy xz; ac_word=$2
13000+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13001+
$as_echo_n "checking for $ac_word... " >&6; }
13002+
if ${ac_cv_prog_XZ+:} false; then :
13003+
$as_echo_n "(cached) " >&6
13004+
else
13005+
if test -n "$XZ"; then
13006+
ac_cv_prog_XZ="$XZ" # Let the user override the test.
13007+
else
13008+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13009+
for as_dir in $PATH
13010+
do
13011+
IFS=$as_save_IFS
13012+
test -z "$as_dir" && as_dir=.
13013+
for ac_exec_ext in '' $ac_executable_extensions; do
13014+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13015+
ac_cv_prog_XZ="xz"
13016+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13017+
break 2
13018+
fi
13019+
done
13020+
done
13021+
IFS=$as_save_IFS
13022+
13023+
fi
13024+
fi
13025+
XZ=$ac_cv_prog_XZ
13026+
if test -n "$XZ"; then
13027+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XZ" >&5
13028+
$as_echo "$XZ" >&6; }
13029+
else
13030+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13031+
$as_echo "no" >&6; }
13032+
fi
13033+
13034+
13035+
if test "$XZ" != ""; then
13036+
HAVE_XZ_TRUE=
13037+
HAVE_XZ_FALSE='#'
13038+
else
13039+
HAVE_XZ_TRUE='#'
13040+
HAVE_XZ_FALSE=
13041+
fi
13042+
13043+
# Extract the first word of "comm", so it can be a program name with args.
13044+
set dummy comm; ac_word=$2
13045+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13046+
$as_echo_n "checking for $ac_word... " >&6; }
13047+
if ${ac_cv_prog_COMM+:} false; then :
13048+
$as_echo_n "(cached) " >&6
13049+
else
13050+
if test -n "$COMM"; then
13051+
ac_cv_prog_COMM="$COMM" # Let the user override the test.
13052+
else
13053+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054+
for as_dir in $PATH
13055+
do
13056+
IFS=$as_save_IFS
13057+
test -z "$as_dir" && as_dir=.
13058+
for ac_exec_ext in '' $ac_executable_extensions; do
13059+
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060+
ac_cv_prog_COMM="comm"
13061+
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062+
break 2
13063+
fi
13064+
done
13065+
done
13066+
IFS=$as_save_IFS
13067+
13068+
fi
13069+
fi
13070+
COMM=$ac_cv_prog_COMM
13071+
if test -n "$COMM"; then
13072+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
13073+
$as_echo "$COMM" >&6; }
13074+
else
13075+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13076+
$as_echo "no" >&6; }
13077+
fi
13078+
13079+
13080+
if test "$COMM" != ""; then
13081+
HAVE_COMM_TRUE=
13082+
HAVE_COMM_FALSE='#'
13083+
else
13084+
HAVE_COMM_TRUE='#'
13085+
HAVE_COMM_FALSE=
13086+
fi
13087+
13088+
13089+
if test "${with_target_subdir}" = "" -a "$FORMAT_FILE" = "elf.lo" -a "${OBJCOPY}" != "" -a "${NM}" != "" -a "${XZ}" != "" -a "${COMM}" != ""; then
13090+
HAVE_MINIDEBUG_TRUE=
13091+
HAVE_MINIDEBUG_FALSE='#'
13092+
else
13093+
HAVE_MINIDEBUG_TRUE='#'
13094+
HAVE_MINIDEBUG_FALSE=
13095+
fi
13096+
13097+
13098+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lzma_auto_decoder in -llzma" >&5
13099+
$as_echo_n "checking for lzma_auto_decoder in -llzma... " >&6; }
13100+
if ${ac_cv_lib_lzma_lzma_auto_decoder+:} false; then :
13101+
$as_echo_n "(cached) " >&6
13102+
else
13103+
ac_check_lib_save_LIBS=$LIBS
13104+
LIBS="-llzma $LIBS"
13105+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13106+
/* end confdefs.h. */
13107+
13108+
/* Override any GCC internal prototype to avoid an error.
13109+
Use char because int might match the return type of a GCC
13110+
builtin and then its argument prototype would still apply. */
13111+
#ifdef __cplusplus
13112+
extern "C"
13113+
#endif
13114+
char lzma_auto_decoder ();
13115+
int
13116+
main ()
13117+
{
13118+
return lzma_auto_decoder ();
13119+
;
13120+
return 0;
13121+
}
13122+
_ACEOF
13123+
if ac_fn_c_try_link "$LINENO"; then :
13124+
ac_cv_lib_lzma_lzma_auto_decoder=yes
13125+
else
13126+
ac_cv_lib_lzma_lzma_auto_decoder=no
13127+
fi
13128+
rm -f core conftest.err conftest.$ac_objext \
13129+
conftest$ac_exeext conftest.$ac_ext
13130+
LIBS=$ac_check_lib_save_LIBS
13131+
fi
13132+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_auto_decoder" >&5
13133+
$as_echo "$ac_cv_lib_lzma_lzma_auto_decoder" >&6; }
13134+
if test "x$ac_cv_lib_lzma_lzma_auto_decoder" = xyes; then :
13135+
13136+
$as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
13137+
13138+
fi
13139+
13140+
if test "$ac_cv_lib_lzma_lzma_auto_decoder" = yes; then
13141+
HAVE_LIBLZMA_TRUE=
13142+
HAVE_LIBLZMA_FALSE='#'
13143+
else
13144+
HAVE_LIBLZMA_TRUE='#'
13145+
HAVE_LIBLZMA_FALSE=
13146+
fi
13147+
13148+
1294713149
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tests can run" >&5
1294813150
$as_echo_n "checking whether tests can run... " >&6; }
1294913151
if ${libbacktrace_cv_sys_native+:} false; then :
@@ -13160,6 +13362,22 @@ if test -z "${HAVE_DSYMUTIL_TRUE}" && test -z "${HAVE_DSYMUTIL_FALSE}"; then
1316013362
as_fn_error $? "conditional \"HAVE_DSYMUTIL\" was never defined.
1316113363
Usually this means the macro was only invoked conditionally." "$LINENO" 5
1316213364
fi
13365+
if test -z "${HAVE_XZ_TRUE}" && test -z "${HAVE_XZ_FALSE}"; then
13366+
as_fn_error $? "conditional \"HAVE_XZ\" was never defined.
13367+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
13368+
fi
13369+
if test -z "${HAVE_COMM_TRUE}" && test -z "${HAVE_COMM_FALSE}"; then
13370+
as_fn_error $? "conditional \"HAVE_COMM\" was never defined.
13371+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
13372+
fi
13373+
if test -z "${HAVE_MINIDEBUG_TRUE}" && test -z "${HAVE_MINIDEBUG_FALSE}"; then
13374+
as_fn_error $? "conditional \"HAVE_MINIDEBUG\" was never defined.
13375+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
13376+
fi
13377+
if test -z "${HAVE_LIBLZMA_TRUE}" && test -z "${HAVE_LIBLZMA_FALSE}"; then
13378+
as_fn_error $? "conditional \"HAVE_LIBLZMA\" was never defined.
13379+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
13380+
fi
1316313381
if test -z "${NATIVE_TRUE}" && test -z "${NATIVE_FALSE}"; then
1316413382
as_fn_error $? "conditional \"NATIVE\" was never defined.
1316513383
Usually this means the macro was only invoked conditionally." "$LINENO" 5

configure.ac

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,21 @@ AC_ARG_VAR(DSYMUTIL, [location of dsymutil])
508508
AC_CHECK_PROG(DSYMUTIL, dsymutil, dsymutil)
509509
AM_CONDITIONAL(HAVE_DSYMUTIL, test -n "${DSYMUTIL}")
510510

511+
AC_ARG_VAR(NM, [location of nm])
512+
AC_CHECK_PROG(NM, nm, nm)
513+
514+
AC_CHECK_PROG(XZ, xz, xz)
515+
AM_CONDITIONAL(HAVE_XZ, test "$XZ" != "")
516+
AC_CHECK_PROG(COMM, comm, comm)
517+
AM_CONDITIONAL(HAVE_COMM, test "$COMM" != "")
518+
519+
AM_CONDITIONAL(HAVE_MINIDEBUG,
520+
test "${with_target_subdir}" = "" -a "$FORMAT_FILE" = "elf.lo" -a "${OBJCOPY}" != "" -a "${NM}" != "" -a "${XZ}" != "" -a "${COMM}" != "")
521+
522+
AC_CHECK_LIB([lzma], [lzma_auto_decoder],
523+
[AC_DEFINE(HAVE_LIBLZMA, 1, [Define if -llzma is available.])])
524+
AM_CONDITIONAL(HAVE_LIBLZMA, test "$ac_cv_lib_lzma_lzma_auto_decoder" = yes)
525+
511526
AC_CACHE_CHECK([whether tests can run],
512527
[libbacktrace_cv_sys_native],
513528
[AC_RUN_IFELSE([AC_LANG_PROGRAM([], [return 0;])],

0 commit comments

Comments
 (0)