Skip to content

Commit 9c299a3

Browse files
jrfastabborkmann
authored andcommitted
bpf: fix for lex/yacc build error with gcc-5
Fix build error found with Ubuntu shipped gcc-5 ~/git/bpf/tools/bpf$ make all Auto-detecting system features: ... libbfd: [ OFF ] ... disassembler-four-args: [ OFF ] CC bpf_jit_disasm.o LINK bpf_jit_disasm CC bpf_dbg.o /home/john/git/bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’: /home/john/git/bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized] } else if (matches(subcmd, "pcap") == 0) { ^ LINK bpf_dbg CC bpf_asm.o make: *** No rule to make target `bpf_exp.yacc.o', needed by `bpf_asm'. Stop. Fixes: 5a8997f ("tools: bpf: respect output directory during build") Signed-off-by: John Fastabend <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]>
1 parent 1612a98 commit 9c299a3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/bpf/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ $(OUTPUT)bpf_asm: $(OUTPUT)bpf_asm.o $(OUTPUT)bpf_exp.yacc.o $(OUTPUT)bpf_exp.le
7676
$(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $^
7777

7878
$(OUTPUT)bpf_exp.lex.c: $(OUTPUT)bpf_exp.yacc.c
79+
$(OUTPUT)bpf_exp.yacc.o: $(OUTPUT)bpf_exp.yacc.c
80+
$(OUTPUT)bpf_exp.lex.o: $(OUTPUT)bpf_exp.lex.c
7981

8082
clean: bpftool_clean
8183
$(call QUIET_CLEAN, bpf-progs)

0 commit comments

Comments
 (0)