diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-12-29 01:03:20 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-12-29 01:07:42 +0100 |
commit | 6a46615f372c02650f290614a8c5351bbadc80ed (patch) | |
tree | 8330bcf15671787be152f34c6b091804de3239b7 | |
parent | 75900a25ed2acd4201bcd9a5516bdf7cdb9a8e73 (diff) | |
download | upstream-6a46615f372c02650f290614a8c5351bbadc80ed.tar.gz upstream-6a46615f372c02650f290614a8c5351bbadc80ed.tar.bz2 upstream-6a46615f372c02650f290614a8c5351bbadc80ed.zip |
imagebuilder: invoke bundle-libraries.sh w/o buildroot dirs in $PATH
Invoke bundle-libraries.sh with any buildroot related directory entries
removed from $PATH to avoid picking up cross versions of utilities like
ldd which will not properly work when used against host executables.
This should fix executable bundling for glibc-target imagebuilders.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | target/imagebuilder/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index e7954e96a4..f9c08776a8 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -19,6 +19,9 @@ IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR)) IB_DTSDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))/arch/$(LINUX_KARCH)/boot/dts/ IB_IDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(STAGING_DIR_IMAGE)) +BUNDLER_PATH := $(subst $(space),:,$(filter-out $(TOPDIR)/%,$(subst :,$(space),$(PATH)))) +BUNDLER_COMMAND := PATH=$(BUNDLER_PATH) $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host + all: compile $(BIN_DIR)/$(IB_NAME).tar.xz: clean @@ -98,7 +101,7 @@ endif $(INSTALL_DIR) $(PKG_BUILD_DIR)/staging_dir/host/bin $(CP) $(STAGING_DIR_HOST)/bin/* $(PKG_BUILD_DIR)/staging_dir/host/bin/ (cd $(PKG_BUILD_DIR); find staging_dir/host/bin/ $(IB_LDIR)/scripts/dtc/ -type f | \ - $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(PKG_BUILD_DIR)/staging_dir/host) + $(BUNDLER_COMMAND)) $(CP) $(TOPDIR)/staging_dir/host/lib/libfakeroot* $(PKG_BUILD_DIR)/staging_dir/host/lib STRIP=$(STAGING_DIR_HOST)/bin/sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/ (cd $(BUILD_DIR); \ |