Skip to content
Snippets Groups Projects
Commit 98ef23dd authored by Felix Fietkau's avatar Felix Fietkau
Browse files

include/bpf.mk: preserve the bpf .o file with debug symbols


Makes it easier to analyze verifier complaints

Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 7ae04d37
No related branches found
No related tags found
1 merge request!79Merge OpenWrt 22.03.0-rc4
......@@ -77,6 +77,7 @@ define CompileBPF
$(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))
$(CP) $(patsubst %.c,%.o,$(1)) $(patsubst %.c,%.debug.o,$(1))
$(LLVM_STRIP) --strip-debug $(patsubst %.c,%.o,$(1))
endef
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment