blob: 23489b562570e7b7a53d63fbd33db3b0cb2b387d [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From f5d6e088f84dd05278c4698a21cbf1ff4569978d Mon Sep 17 00:00:00 2001
2From: Mark Wielaard <mark@klomp.org>
3Date: Tue, 22 Oct 2024 15:03:42 +0200
4Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive
5
6libelf might use some symbols from libeu.a, specifically the eu-search
7wrappers. But we don't ship libeu.a separately. So include the libeu
8objects in the libelf.a archive to facilitate static linking.
9
10 * libelf/Makefile.am (libeu_objects): New variable.
11 (libelf_a_LIBADD): New, add libeu_objects.
12
13https://sourceware.org/bugzilla/show_bug.cgi?id=32293
14
15Signed-off-by: Mark Wielaard <mark@klomp.org>
16---
17 libelf/Makefile.am | 3 +++
18 1 file changed, 3 insertions(+)
19
20--- a/libelf/Makefile.am
21+++ b/libelf/Makefile.am
22@@ -122,6 +122,9 @@ libelf.so: $(srcdir)/libelf.map $(libelf
23 @$(textrel_check)
24 $(AM_V_at)ln -fs $@ $@.$(VERSION)
25
26+libeu_objects = $(shell $(AR) t ../lib/libeu.a)
27+libelf_a_LIBADD = $(addprefix ../lib/,$(libeu_objects))
28+
29 install: install-am libelf.so
30 $(mkinstalldirs) $(DESTDIR)$(libdir)
31 $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so