]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libelf: Add libeu objects to libelf.a static archive
authorMark Wielaard <mark@klomp.org>
Tue, 22 Oct 2024 13:03:42 +0000 (15:03 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 23 Oct 2024 22:09:41 +0000 (00:09 +0200)
libelf might use some symbols from libeu.a, specifically the eu-search
wrappers. But we don't ship libeu.a separately. So include the libeu
objects in the libelf.a archive to facilitate static linking.

* libelf/Makefile.am (libeu_objects): New variable.
(libelf_a_LIBADD): New, add libeu_objects.

https://sourceware.org/bugzilla/show_bug.cgi?id=32293

Signed-off-by: Mark Wielaard <mark@klomp.org>
libelf/Makefile.am

index 3402863ef17466bd422cc0510c89c73410d25bab..2d3dbdf22756191faad3c51354b4af1baf37ca33 100644 (file)
@@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
        @$(textrel_check)
        $(AM_V_at)ln -fs $@ $@.$(VERSION)
 
+libeu_objects = $(shell $(AR) t ../lib/libeu.a)
+libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
+
 install: install-am libelf.so
        $(mkinstalldirs) $(DESTDIR)$(libdir)
        $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so