aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-11-22 01:43:43 -0800
committerFelix Fietkau <nbd@nbd.name>2021-11-22 12:00:40 +0100
commit340c2ed2ef6578483f974e274bf6d638f953a246 (patch)
tree8b4cc72d444b7cea21cbded25901535d506ab4a4 /tools
parent8f458498768ab164d5e42becca52624448dfe2ee (diff)
downloadupstream-340c2ed2ef6578483f974e274bf6d638f953a246.tar.gz
upstream-340c2ed2ef6578483f974e274bf6d638f953a246.tar.bz2
upstream-340c2ed2ef6578483f974e274bf6d638f953a246.zip
tools/llvm-bpf: move tarball packing to target/llvm-bpf
This ensures that the tarball is regenerated after make clean or after switching to a different target Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile3
-rw-r--r--tools/llvm-bpf/Makefile14
2 files changed, 3 insertions, 14 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 82a67a00dd..686d5294d3 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -156,8 +156,7 @@ $(curdir)/ := .config prereq
$(curdir)/install: $(curdir)/compile
-tools_config = CONFIG_SDK_LLVM_BPF
-tools_enabled = $(foreach tool,$(sort $(tools-y) $(tools-)),$(if $(filter $(tool),$(tools-y)),y,n))$(foreach c,$(tools_config),$(if $($(c)),y,n))
+tools_enabled = $(foreach tool,$(sort $(tools-y) $(tools-)),$(if $(filter $(tool),$(tools-y)),y,n))
$(eval $(call stampfile,$(curdir),tools,compile,,_$(subst $(space),,$(tools_enabled)),$(STAGING_DIR_HOST)))
$(eval $(call stampfile,$(curdir),tools,check,$(TMP_DIR)/.build,,$(STAGING_DIR_HOST)))
$(eval $(call subdir,$(curdir)))
diff --git a/tools/llvm-bpf/Makefile b/tools/llvm-bpf/Makefile
index 586c8dba2d..527b357824 100644
--- a/tools/llvm-bpf/Makefile
+++ b/tools/llvm-bpf/Makefile
@@ -41,22 +41,12 @@ CMAKE_HOST_OPTIONS += \
-DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \
-DCMAKE_SKIP_RPATH=OFF
-$(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz: $(HOST_STAMP_INSTALLED)
- echo "$(PKG_VERSION)" > $(CMAKE_HOST_INSTALL_PREFIX)/.llvm-version
- STRIP_KMOD= PATCHELF= STRIP=strip $(SCRIPT_DIR)/rstrip.sh $(STAGING_DIR_HOST)/llvm-bpf
- tar -C $(STAGING_DIR_HOST) \
- -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' \
- -cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX)
- mv $@.tmp $@
-
-ifneq ($(CONFIG_SDK_LLVM_BPF),)
-compile: $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz
-endif
-
define Host/Install
rm -rf $(STAGING_DIR_HOST)/llvm-bpf*
$(Host/Install/Default)
ln -s $(LLVM_BPF_PREFIX) $(STAGING_DIR_HOST)/llvm-bpf
+ STRIP_KMOD= PATCHELF= STRIP=strip $(SCRIPT_DIR)/rstrip.sh $(STAGING_DIR_HOST)/llvm-bpf
+ echo "$(PKG_VERSION)" > $(CMAKE_HOST_INSTALL_PREFIX)/.llvm-version
endef
define Host/Uninstall