1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-24 08:17:38 +01:00

link sublibs against liblzma as needed

The coredump/elf32/elf64/elfxx libs use lzma funcs but don't link against
it.  This produces sub-shared libs that don't link against lzma and can
make the linker angry due to underlinking like so:

libtool: link: x86_64-pc-linux-gnu-gcc -O2 -march=amdfam10 -pipe -g \
	-frecord-gcc-switches -Wimplicit-function-declaration -fexceptions \
	-Wall -Wsign-compare -Wl,-O1 -Wl,--hash-style=gnu \
	-o .libs/test-coredump-unwind test-coredump-unwind.o  \
	../src/.libs/libunwind-coredump.so ../src/.libs/libunwind-x86_64.so
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_footer_decode'
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_buffer_decode'
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_size'
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_end'
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_index_uncompressed_size'
../src/.libs/libunwind-coredump.so: error: undefined reference to 'lzma_stream_buffer_decode'
collect2: error: ld returned 1 exit status

So add LIBLZMA to the right LIBADD for each of these libraries.

URL: https://bugs.gentoo.org/444050
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2014-02-15 21:09:42 -05:00 committed by Arun Sharma
parent 4eb880e1b5
commit 385c19f335

View file

@ -68,6 +68,7 @@ libunwind_coredump_la_SOURCES = \
coredump/_UPT_resume.c
libunwind_coredump_la_LDFLAGS = $(COMMON_SO_LDFLAGS) \
-version-info $(COREDUMP_SO_VERSION)
libunwind_coredump_la_LIBADD = $(LIBLZMA)
noinst_HEADERS += coredump/_UCD_internal.h coredump/_UCD_lib.h
### libunwind-setjmp:
@ -178,6 +179,9 @@ noinst_HEADERS += elf32.h elf64.h elfxx.h
libunwind_elf32_la_SOURCES = elf32.c
libunwind_elf64_la_SOURCES = elf64.c
libunwind_elfxx_la_SOURCES = elfxx.c
libunwind_elf32_la_LIBADD = $(LIBLZMA)
libunwind_elf64_la_LIBADD = $(LIBLZMA)
libunwind_elfxx_la_LIBADD = $(LIBLZMA)
noinst_LTLIBRARIES += $(LIBUNWIND_ELF)
libunwind_la_LIBADD += $(LIBUNWIND_ELF)