X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Fsdk%2FMakefile;fp=target%2Fsdk%2FMakefile;h=3b860db93a28f0a8aa1144443a6d65efda106c61;hp=95ac3be197588ff98c8c2b7daa8c8c850a91d22c;hb=a9f6fceb4255ba847415cf82035f5fde3dc0ce2a;hpb=40de4c038a5c9e452dcaa4939c4ed167e9db50d9 diff --git a/target/sdk/Makefile b/target/sdk/Makefile index 95ac3be197..3b860db93a 100644 --- a/target/sdk/Makefile +++ b/target/sdk/Makefile @@ -94,6 +94,14 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean $(TAR) -cf - -C $(TOPDIR) $(KDIR_BASE)/tools/usb/usbip/ | \ $(TAR) -xf - -C $(SDK_BUILD_DIR) + # Copy objtool executables. They are required for building external + # modules if "Compile-time stack metadata validation" is enabled. + if grep -q '^CONFIG_STACK_VALIDATION=y' $(LINUX_DIR)/.config; then \ + $(TAR) -cf - -C $(TOPDIR) \ + `cd $(TOPDIR); find $(KDIR_BASE)/tools/objtool -type f -executable` | \ + $(TAR) -xf - -C $(SDK_BUILD_DIR); \ + fi + (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 \ -type f | $(XARGS) $(SCRIPT_DIR)/bundle-libraries.sh $(SDK_BUILD_DIR)/$(STAGING_SUBDIR_HOST))