[openwrt/openwrt] bpf: add -mcpu=v3 to support 32-bit alu ops
LEDE Commits
lede-commits at lists.infradead.org
Tue Dec 21 02:29:34 PST 2021
nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c46202fb34bbf6d1e159c1a1bbdec8a9ec726285
commit c46202fb34bbf6d1e159c1a1bbdec8a9ec726285
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Dec 21 00:28:54 2021 +0100
bpf: add -mcpu=v3 to support 32-bit alu ops
Fixes JIT on 32-bit ARM and improves performance
Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
include/bpf.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/bpf.mk b/include/bpf.mk
index 411763c4a2..ce30e24434 100644
--- a/include/bpf.mk
+++ b/include/bpf.mk
@@ -76,7 +76,7 @@ define CompileBPF
-c $(1) -o $(patsubst %.c,%.bc,$(1))
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(1))
$(LLVM_DIS) < $(patsubst %.c,%.opt,$(1)) > $(patsubst %.c,%.S,$(1))
- $(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))
$(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1))
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
endef
More information about the lede-commits
mailing list