b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From f5d6e088f84dd05278c4698a21cbf1ff4569978d Mon Sep 17 00:00:00 2001 |
| 2 | From: Mark Wielaard <mark@klomp.org> |
| 3 | Date: Tue, 22 Oct 2024 15:03:42 +0200 |
| 4 | Subject: [PATCH] libelf: Add libeu objects to libelf.a static archive |
| 5 | |
| 6 | libelf might use some symbols from libeu.a, specifically the eu-search |
| 7 | wrappers. But we don't ship libeu.a separately. So include the libeu |
| 8 | objects 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 | |
| 13 | https://sourceware.org/bugzilla/show_bug.cgi?id=32293 |
| 14 | |
| 15 | Signed-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 |