aboutsummaryrefslogtreecommitdiffstats
path: root/include/bpf.mk
diff options
context:
space:
mode:
Diffstat (limited to 'include/bpf.mk')
-rw-r--r--include/bpf.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/bpf.mk b/include/bpf.mk
index 7d0cfbd76d..e43fcad50c 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -63,6 +63,7 @@ BPF_CFLAGS := \
-Wno-unused-label \
-O2 -emit-llvm -Xclang -disable-llvm-passes
+ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
ifeq ($(DUMP),)
CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
@@ -70,6 +71,7 @@ ifeq ($(DUMP),)
$(error ERROR: LLVM/clang version too old. Minimum required: $(CLANG_MIN_VER), found: $(CLANG_VER))
endif
endif
+endif
define CompileBPF
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \