Skip to content

Commit

Permalink
bpf: fix llvm version check
Browse files Browse the repository at this point in the history
- specify CC target explicitly

Signed-off-by: Konstantin Demin <[email protected]>
Link: openwrt/openwrt#15703
Signed-off-by: Robert Marko <[email protected]>
  • Loading branch information
rockdrilla authored and robimarko committed Sep 9, 2024
1 parent 1528031 commit f61fb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/bpf.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f61fb07

Please sign in to comment.