[Bug,libelf/32293] Build of vl4-utils using elfutils-0.192 libelf (static) fails

Message ID bug-32293-10460-8Sm5ZedGgu@http.sourceware.org/bugzilla/
State Superseded
Headers
Series [Bug,libelf/32293] Build of vl4-utils using elfutils-0.192 libelf (static) fails |

Commit Message

amerey at redhat dot com Oct. 21, 2024, 6:33 p.m. UTC
  https://sourceware.org/bugzilla/show_bug.cgi?id=32293

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at klomp dot org

--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Is there a reason vl4-utils cannot simply be linked shared to libelf?
In general we aren't really testing static linking.
Which indeed means it is now broken :{

Maybe something like the following would help?

        $(INSTALL_PROGRAM) libelf.so
$(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so

I don't have anything to test that with though.
(You'll need to autoregen -f -v -i)
  

Patch

diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index 3402863ef174..2d3dbdf22756 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -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)