mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-19 05:38:00 +00:00
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@nbd.name>
This commit is contained in:
parent
3eff363ec3
commit
c46202fb34
@ -76,7 +76,7 @@ define CompileBPF
|
|||||||
-c $(1) -o $(patsubst %.c,%.bc,$(1))
|
-c $(1) -o $(patsubst %.c,%.bc,$(1))
|
||||||
$(LLVM_OPT) -O2 -mtriple=$(BPF_TARGET) < $(patsubst %.c,%.bc,$(1)) > $(patsubst %.c,%.opt,$(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_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))
|
$(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1))
|
||||||
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
|
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
|
||||||
endef
|
endef
|
||||||
|
Loading…
Reference in New Issue
Block a user