aboutsummaryrefslogtreecommitdiffstats
path: root/include/bpf.mk
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-11-18 22:25:47 +0100
committerFelix Fietkau <nbd@nbd.name>2021-11-19 23:51:20 +0100
commit8f355becdf39e4a166063a887f04f7b4feb78cc0 (patch)
tree115931b20841f9072b6c2062c5b791cde386641f /include/bpf.mk
parentff6b89df708336e9628c04bba42bd09c1164d6c0 (diff)
downloadupstream-8f355becdf39e4a166063a887f04f7b4feb78cc0.tar.gz
upstream-8f355becdf39e4a166063a887f04f7b4feb78cc0.tar.bz2
upstream-8f355becdf39e4a166063a887f04f7b4feb78cc0.zip
bpf-headers: switch to mips64 for 64 bit targets
BTF pointer data has a different size on 32 vs 64 bit targets, and while the generated eBPF code works, the BTF data fails to validate on mismatch Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'include/bpf.mk')
-rw-r--r--include/bpf.mk4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/bpf.mk b/include/bpf.mk
index 61e5b534ab..411763c4a2 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -27,7 +27,7 @@ LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
BPF_KARCH:=mips
-BPF_ARCH:=mips$(if $(CONFIG_BIG_ENDIAN),,el)
+BPF_ARCH:=mips$(if $(CONFIG_ARCH_64BIT),64)$(if $(CONFIG_BIG_ENDIAN),,el)
BPF_TARGET:=bpf$(if $(CONFIG_BIG_ENDIAN),eb,el)
BPF_HEADERS_DIR:=$(STAGING_DIR)/bpf-headers
@@ -49,7 +49,7 @@ BPF_KERNEL_INCLUDE := \
BPF_CFLAGS := \
$(BPF_KERNEL_INCLUDE) -I$(PKG_BUILD_DIR) \
- -D__KERNEL__ -D__BPF_TRACING__ \
+ -D__KERNEL__ -D__BPF_TRACING__ -DCONFIG_GENERIC_CSUM \
-D__TARGET_ARCH_${BPF_KARCH} \
-m$(if $(CONFIG_BIG_ENDIAN),big,little)-endian \
-fno-stack-protector -Wall \