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>
This commit is contained in:
Konstantin Demin 2024-06-13 20:56:31 +03:00 committed by Robert Marko
parent 15280316fa
commit f61fb07675
1 changed files with 1 additions and 1 deletions

View File

@ -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))