summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Demin <rockdrilla@gmail.com>2024-06-13 20:56:31 +0300
committerRobert Marko <robimarko@gmail.com>2024-09-09 10:36:47 +0200
commitf61fb07675631c5615f816479cc638c7b1d7acd4 (patch)
treed8ca12d0e6b3cde98f8e5b6d2cec245ac535798f
parent15280316faa865a933913748c2153d6fb0f1b48f (diff)
downloadopenwrt-f61fb07675631c5615f816479cc638c7b1d7acd4.tar.gz
openwrt-f61fb07675631c5615f816479cc638c7b1d7acd4.tar.bz2
openwrt-f61fb07675631c5615f816479cc638c7b1d7acd4.zip
bpf: fix llvm version check
- specify CC target explicitly Signed-off-by: Konstantin Demin <rockdrilla@gmail.com> Link: https://github.com/openwrt/openwrt/pull/15703 Signed-off-by: Robert Marko <robimarko@gmail.com>
-rw-r--r--include/bpf.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/bpf.mk b/include/bpf.mk
index 85c3edb4c7..2b7aa8512c 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -66,7 +66,7 @@ BPF_CFLAGS := \
ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
ifeq ($(DUMP)$(filter download refresh,$(MAKECMDGOALS)),)
- CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
+ CLANG_VER:=$(shell $(CLANG) --target=$(BPF_TARGET) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
ifeq ($(CLANG_VER_VALID),)
$(error ERROR: LLVM/clang version too old. Minimum required: $(CLANG_MIN_VER), found: $(CLANG_VER))