From aed33811a7780131e72bf14a616579bee46ce5ae Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Tue, 3 May 2022 07:42:32 +0200
Subject: [PATCH] bpf.mk: backport a fix that unbreaks bpf compile on armv7

Signed-off-by: John Crispin <john@phrozen.org>
---
 include/bpf.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/bpf.mk b/include/bpf.mk
index 2f797625b6..d8164436a4 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -66,7 +66,7 @@ define CompileBPF
 	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
 	$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
 	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
-	$(LLVM_LLC) -march=$(BPF_TARGET) -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
+	$(LLVM_LLC) -march=$(BPF_TARGET) -mcpu=v3 -filetype=obj -o $(patsubst %.c,%.o,$(1)) < $(patsubst %.c,%.S,$(1))
 	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(STAGING_DIR_HOST)/lib \
 	$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
 endef
-- 
2.25.1

