aboutsummaryrefslogtreecommitdiffstats
path: root/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 16:58:51 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-10 16:58:51 -0700
commit8a77a893e321c1fff214a542840be4f9ac03627b (patch)
treeaea4b6e5817610e20bbf4b1ccd8c9fe7c0295309 /perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
parentccffb30ab2ec6e5b0ae3aaf1d0f77d3bf3c9527a (diff)
downloadpatches-8a77a893e321c1fff214a542840be4f9ac03627b.tar.gz
more patches
Diffstat (limited to 'perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch')
-rw-r--r--perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch b/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
new file mode 100644
index 00000000000000..e8c89e70dbeda5
--- /dev/null
+++ b/perf-turn-off-compiler-warnings-for-flex-and-bison-generated-files.patch
@@ -0,0 +1,43 @@
+From foo@baz Fri May 4 11:27:46 PDT 2012
+Date: Fri, 04 May 2012 11:27:46 -0700
+To: Peter Zijlstra <a.p.zijlstra@chello.nl>
+To: Paul Mackerras <paulus@samba.org>
+To: Ingo Molnar <mingo@redhat.com>
+To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: [PATCH] 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.
+
+Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Cc: Paul Mackerras <paulus@samba.org>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+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...
+
+ tools/perf/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/tools/perf/Makefile
++++ b/tools/perf/Makefile
+@@ -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) $<