Re: perf build with clang, modulo libpython: Re: perf bison: clang points out: error: conflicting types for 'parse_events_error' always evaluate to 'true'
From: Jiri Olsa
Date: Wed Feb 15 2017 - 08:21:56 EST
On Wed, Feb 15, 2017 at 10:06:05AM -0300, Arnaldo Carvalho de Melo wrote:
SNIP
>
> clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument]
> clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument]
> error: command 'clang' failed with exit status 1
> cp: cannot stat '/tmp/build/perf/python_ext_build/lib/perf.so': No such file or directory
> Makefile.perf:381: recipe for target '/tmp/build/perf/python/perf.so' failed
> make[2]: *** [/tmp/build/perf/python/perf.so] Error 1
> make[2]: *** Waiting for unfinished jobs....
>
> ---------------------------------------------------
>
>
> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index 3a5196380609..a14b47ab3879 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -17,6 +17,8 @@
> #include "parse-events.h"
> #include "parse-events-bison.h"
>
> +void parse_events_error(YYLTYPE *loc, void *data, void *scanner, char const *msg);
> +
> #define ABORT_ON(val) \
> do { \
> if (val) \
if that helps.. seems harmless ;-) ack
jirka