aboutsummaryrefslogtreecommitdiffstats
path: root/target/sdk
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-12-29 01:06:43 +0100
committerJo-Philipp Wich <jo@mein.io>2020-12-29 01:07:42 +0100
commit7e4585e59362b581cedcbd852036789f713ae236 (patch)
tree17b53367da631e52a2c73f430bc2bdfe061a217d /target/sdk
parent6a46615f372c02650f290614a8c5351bbadc80ed (diff)
downloadupstream-7e4585e59362b581cedcbd852036789f713ae236.tar.gz
upstream-7e4585e59362b581cedcbd852036789f713ae236.tar.bz2
upstream-7e4585e59362b581cedcbd852036789f713ae236.zip
sdk: 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 SDKs. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'target/sdk')
-rw-r--r--target/sdk/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index caec7178e9..d7e10a9bd8 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -20,6 +20,9 @@ STAGING_SUBDIR_HOST := staging_dir/host
STAGING_SUBDIR_TARGET := staging_dir/$(TARGET_DIR_NAME)
STAGING_SUBDIR_TOOLCHAIN := staging_dir/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)_$(LIBC)$(if $(CONFIG_arm),_eabi)
+BUNDLER_PATH := $(subst $(space),:,$(filter-out $(TOPDIR)/%,$(subst :,$(space),$(PATH))))
+BUNDLER_COMMAND := PATH=$(BUNDLER_PATH) $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST)
+
EXCLUDE_DIRS:= \
*/stamp \
*/stampfiles \
@@ -104,7 +107,7 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean
(cd $(SDK_BUILD_DIR); find $(STAGING_SUBDIR_HOST)/bin $(STAGING_SUBDIR_HOST)/usr/bin \
$(STAGING_SUBDIR_TOOLCHAIN)/bin $(STAGING_SUBDIR_TOOLCHAIN)/*/bin $(STAGING_SUBDIR_TOOLCHAIN)/libexec \
$(KDIR_BASE) \
- -type f | $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST))
+ -type f | $(BUNDLER_COMMAND))
@-( \
find \