Re: [PATCH 1/2] perf: fix build error

From: Namhyung Kim
Date: Mon Jul 23 2012 - 20:43:51 EST


Hi, Kirill

On Tue, 24 Jul 2012 00:04:07 +0300, Kirill A. Shutemov wrote:
> From 14f476dddcb36bca93a50ef1a3341e2c60836e0a Mon Sep 17 00:00:00 2001
> From: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx>
> Date: Mon, 23 Jul 2012 17:39:11 +0300
> Subject: [PATCH 1/2] perf: fix build error
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Bison 2.6 started to generate parse_events_parse() declaration in
> header. In this case we have redundant redeclaration:
>
> util/parse-events.c:29:5: error: redundant redeclaration of âparse_events_parseâ [-Werror=redundant-decls]
> In file included from util/parse-events.c:14:0:
> util/parse-events-bison.h:99:5: note: previous declaration of âparse_events_parseâ was here
> cc1: all warnings being treated as errors
>
> Let's disable -Wredundant-decls for util/parse-events.c since it
> includes header we can't control.
>

It'd be better if the subject line is more descriptive. Like:

"perf tools: fix a build error with bison 2.6"

Other than that, looks good to me.

Thanks,
Namhyung


> Signed-off-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
> ---
> tools/perf/Makefile | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 75d74e5..1091192 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -803,6 +803,9 @@ $(OUTPUT)ui/browsers/map.o: ui/browsers/map.c $(OUTPUT)PERF-CFLAGS
> $(OUTPUT)util/rbtree.o: ../../lib/rbtree.c $(OUTPUT)PERF-CFLAGS
> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -DETC_PERFCONFIG='"$(ETC_PERFCONFIG_SQ)"' $<
>
> +$(OUTPUT)util/parse-events.o: util/parse-events.c $(OUTPUT)PERF-CFLAGS
> + $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) -Wno-redundant-decls $<
> +
> $(OUTPUT)util/scripting-engines/trace-event-perl.o: util/scripting-engines/trace-event-perl.c $(OUTPUT)PERF-CFLAGS
> $(QUIET_CC)$(CC) -o $@ -c $(ALL_CFLAGS) $(PERL_EMBED_CCOPTS) -Wno-redundant-decls -Wno-strict-prototypes -Wno-unused-parameter -Wno-shadow $<
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/