Aaron Merey e1311a
From 0a65a54593ae489d40cb993caa74095d45bc47fd Mon Sep 17 00:00:00 2001
Aaron Merey e1311a
From: Mark Wielaard <mark@klomp.org>
Aaron Merey e1311a
Date: Tue, 22 Oct 2024 15:03:42 +0200
Aaron Merey e1311a
Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive
Aaron Merey e1311a
Aaron Merey e1311a
libelf might use some symbols from libeu.a, specifically the eu-search
Aaron Merey e1311a
wrappers. But we don't ship libeu.a separately. So include the libeu
Aaron Merey e1311a
objects in the libelf.a archive to facilitate static linking.
Aaron Merey e1311a
Aaron Merey e1311a
	* libelf/Makefile.am (libeu_objects): New variable.
Aaron Merey e1311a
	(libelf_a_LIBADD): New, add libeu_objects.
Aaron Merey e1311a
Aaron Merey e1311a
https://sourceware.org/bugzilla/show_bug.cgi?id=32293
Aaron Merey e1311a
Aaron Merey e1311a
Signed-off-by: Mark Wielaard <mark@klomp.org>
Aaron Merey e1311a
---
Aaron Merey e1311a
 libelf/Makefile.am | 3 +++
Aaron Merey e1311a
 1 file changed, 3 insertions(+)
Aaron Merey e1311a
Aaron Merey e1311a
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
Aaron Merey e1311a
index 3402863e..2d3dbdf2 100644
Aaron Merey e1311a
--- a/libelf/Makefile.am
Aaron Merey e1311a
+++ b/libelf/Makefile.am
Aaron Merey e1311a
@@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
Aaron Merey e1311a
 	@$(textrel_check)
Aaron Merey e1311a
 	$(AM_V_at)ln -fs $@ $@.$(VERSION)
Aaron Merey e1311a
 
Aaron Merey e1311a
+libeu_objects = $(shell $(AR) t ../lib/libeu.a)
Aaron Merey e1311a
+libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
Aaron Merey e1311a
+
Aaron Merey e1311a
 install: install-am libelf.so
Aaron Merey e1311a
 	$(mkinstalldirs) $(DESTDIR)$(libdir)
Aaron Merey e1311a
 	$(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so
Aaron Merey e1311a
-- 
Aaron Merey e1311a
2.47.0
Aaron Merey e1311a