From: Konstantin Demin Date: Thu, 13 Jun 2024 17:56:31 +0000 (+0300) Subject: bpf: fix llvm version check X-Git-Tag: v24.10.0-rc1~832 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F15703%2Fhead;p=thirdparty%2Fopenwrt.git bpf: fix llvm version check - specify CC target explicitly Signed-off-by: Konstantin Demin Link: https://github.com/openwrt/openwrt/pull/15703 Signed-off-by: Robert Marko --- diff --git a/include/bpf.mk b/include/bpf.mk index 85c3edb4c77..2b7aa8512c2 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))