[openwrt/openwrt] tools/elfutils: only build required components

LEDE Commits lede-commits at lists.infradead.org
Wed May 18 16:37:44 PDT 2022


stintel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f64bd4b6cef3b9a57f26928c1b8932534695cb72

commit f64bd4b6cef3b9a57f26928c1b8932534695cb72
Author: Stijn Tintel <stijn at linux-ipv6.be>
AuthorDate: Thu May 19 01:53:49 2022 +0300

    tools/elfutils: only build required components
    
    Building all of the components results in strip being installed in
    staging_dir/host/bin. This strip binary will take precedence over
    binutils strip that is installed in the toolchain directory.
    
    This will not work on host systems that do not have libdw installed, as
    we do not set HOST_LDFLAGS to override rpath to staging_dir/host/lib.
    However, rather than overriding rpath, we should just avoid using
    elfutils strip entirely.
    
    Override the SUBDIRS variable in the Makefile to only build and install
    the libraries we require for dwarves and frr.
    
    Fixes the following build failure in toolchain/gdb:
    strip: error while loading shared libraries: libdw.so.1: cannot open shared object file: No such file or directory
    
    Fixes: ad79b9271949 ("elfutils: move host build to tools")
    Reported-by: Dominick Grift <dominick.grift at defensec.nl>
    Reported-by: Lucian Cristian <lucian.cristian at gmail.com>
    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 tools/elfutils/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index 98694beb0e..2f4dd8f253 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -29,4 +29,7 @@ HOST_CONFIGURE_ARGS += \
 	--without-lzma \
 	--without-zstd
 
+HOST_MAKE_FLAGS += \
+	SUBDIRS="lib libelf libcpu backends libebl libdwelf libdwfl libdw"
+
 $(eval $(call HostBuild))




More information about the lede-commits mailing list