diff mbox series

[bpf] bpf: fix for lex/yacc build error with gcc-5

Message ID 20180425155310.17865.51096.stgit@john-Precision-Tower-5810
State Changes Requested, archived
Delegated to: BPF Maintainers
Headers show
Series [bpf] bpf: fix for lex/yacc build error with gcc-5 | expand

Commit Message

John Fastabend April 25, 2018, 3:53 p.m. UTC
~/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: 5a8997f20715 ("tools: bpf: respect output directory during build")
Signed-off-by: John Fastabend <john.fastabend@gmail.com>
---
 tools/bpf/Makefile |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile
index 1ea5459..557a4a6 100644
--- a/tools/bpf/Makefile
+++ b/tools/bpf/Makefile
@@ -75,7 +75,8 @@  $(OUTPUT)bpf_dbg: $(OUTPUT)bpf_dbg.o
 $(OUTPUT)bpf_asm: $(OUTPUT)bpf_asm.o $(OUTPUT)bpf_exp.yacc.o $(OUTPUT)bpf_exp.lex.o
 	$(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $^
 
-$(OUTPUT)bpf_exp.lex.c: $(OUTPUT)bpf_exp.yacc.c
+$(OUTPUT)bpf_exp.yacc.o: $(OUTPUT)bpf_exp.yacc.c
+$(OUTPUT)bpf_exp.lex.o: $(OUTPUT)bpf_exp.lex.c
 
 clean: bpftool_clean
 	$(call QUIET_CLEAN, bpf-progs)