perf: turn off compiler warnings for flex and bison generated files
PATCH 1/1 perf: turn off compiler warnings for flex and bison generated files
We don't know what types of warnings different versions of flex and bison combined with different versions of gcc is going to generate, so just punt and don't warn about anything.
This fixes the build of perf for me on an openSUSE 12.1 system.
---
Note, I don't really like this, but how else are we going to ensure that we catch all warnings? Pick them off one by one? Better ideas are accepted, but something needs to be done soon, you don't want this broken for 3.4.
tools/perf/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/Makefile +2 -2
@@ -774,10 +774,10 @@ $(OUTPUT)perf.o perf.spec \ # over the general rule for .o $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $< + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $< $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $< + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $< $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<
[tip:perf/urgent] perf: Turn off compiler warnings for flex and bison generated files
Commit-ID: 09c0211c0bb0e40231e6ee9a35041d467ed72f16 Gitweb: http://git.kernel.org/tip/09c0211c0bb0e40231e6ee9a35041d467ed72f16 Author: Greg Kroah-Hartman <[email protected]> AuthorDate: Fri, 4 May 2012 11:32:54 -0700 Committer: Ingo Molnar <[email protected]> CommitDate: Mon, 7 May 2012 10:03:01 +0200
perf: Turn off compiler warnings for flex and bison generated files
We don't know what types of warnings different versions of flex and bison combined with different versions of gcc is going to generate, so just punt and don't warn about anything.
This fixes the build of perf for me on an openSUSE 12.1 system.
--- tools/perf/Makefile | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/Makefile +2 -2
@@ -774,10 +774,10 @@ $(OUTPUT)perf.o perf.spec \ # over the general rule for .o $(OUTPUT)util/%-flex.o: $(OUTPUT)util/%-flex.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $< + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Iutil/ -w $< $(OUTPUT)util/%-bison.o: $(OUTPUT)util/%-bison.c $(OUTPUT)PERF-CFLAGS - $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -Wno-redundant-decls -Wno-switch-default -Wno-unused-function $< + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DYYENABLE_NLS=0 -DYYLTYPE_IS_TRIVIAL=0 -Iutil/ -w $< $(OUTPUT)%.o: %.c $(OUTPUT)PERF-CFLAGS $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $<