projects
/
openwrt
/
staging
/
chunkeey.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ae04d3
)
include/bpf.mk: preserve the bpf .o file with debug symbols
author
Felix Fietkau
<nbd@nbd.name>
Thu, 18 Nov 2021 15:47:51 +0000
(16:47 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Fri, 19 Nov 2021 22:51:20 +0000
(23:51 +0100)
Makes it easier to analyze verifier complaints
Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/bpf.mk
patch
|
blob
|
history
diff --git
a/include/bpf.mk
b/include/bpf.mk
index d9f1153cba9324d744785bf70601b403be77db1c..61e5b534ab2ba538357ee3db95344d4282422da1 100644
(file)
--- a/
include/bpf.mk
+++ b/
include/bpf.mk
@@
-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