libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH] link sublibs against liblzma as needed


From: Mike Frysinger
Subject: [Libunwind-devel] [PATCH] link sublibs against liblzma as needed
Date: Sat, 15 Feb 2014 21:09:42 -0500

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 <address@hidden>
---
 src/Makefile.am | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/Makefile.am b/src/Makefile.am
index 9d82a4f..efa976b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -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)
-- 
1.8.5.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]