linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 1/2] perf tools: Fix bison object compilation with clang 15
Date: Thu, 29 Sep 2022 15:01:48 -0300	[thread overview]
Message-ID: <YzXdjNNh+jbYDnYz@kernel.org> (raw)
In-Reply-To: <20220929140514.226807-1-jolsa@kernel.org>

Em Thu, Sep 29, 2022 at 04:05:13PM +0200, Jiri Olsa escreveu:
> Arnaldo reported compilation fail with clang 15:
> 
>     CC      util/parse-events-bison.o
>   util/parse-events-bison.c:1401:9: error: variable 'parse_events_nerrs'
>   set but not used [-Werror,-Wunused-but-set-variable]
>       int yynerrs = 0;
>         ^
>   util/parse-events-bison.c:72:25: note: expanded from macro 'yynerrs'
>   #define yynerrs         parse_events_nerrs
>                         ^
>   1 error generated.
> 
> Disabling -Wunused-but-set-variable check for bison object compilation.

So we have to disable something else:

  37    44.92 fedora:32                     : FAIL clang version 10.0.1 (Fedora 10.0.1-3.fc32)
    error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
    make[3]: *** [/git/perf-6.0.0-rc7/tools/build/Makefile.build:139: util] Error 2
  38    61.77 fedora:33                     : FAIL clang version 11.0.0 (Fedora 11.0.0-3.fc33)
    error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
    make[3]: *** [/git/perf-6.0.0-rc7/tools/build/Makefile.build:139: util] Error 2
  39    66.59 fedora:34                     : FAIL clang version 12.0.1 (Fedora 12.0.1-1.fc34)
    error: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Werror,-Wunknown-warning-option]
    make[3]: *** [/git/perf-6.0.0-rc7/tools/build/Makefile.build:139: util] Error 2


I'll try yours + -Wno-unknown-warning-option

;-)

- Arnaldo
 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
>  tools/perf/util/Build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index 8fd6dc8de521..d559c80559e3 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -270,7 +270,7 @@ CFLAGS_expr-flex.o          += $(flex_flags)
>  bison_flags := -DYYENABLE_NLS=0
>  BISON_GE_35 := $(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 35)
>  ifeq ($(BISON_GE_35),1)
> -  bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum
> +  bison_flags += -Wno-unused-parameter -Wno-nested-externs -Wno-implicit-function-declaration -Wno-switch-enum -Wno-unused-but-set-variable
>  else
>    bison_flags += -w
>  endif
> -- 
> 2.37.3

-- 

- Arnaldo

  parent reply	other threads:[~2022-09-29 18:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 14:05 [PATCH 1/2] perf tools: Fix bison object compilation with clang 15 Jiri Olsa
2022-09-29 14:05 ` [PATCH 2/2] perf tools: Remove unused variable in tests/test-basic.c Jiri Olsa
2022-09-29 18:10   ` Arnaldo Carvalho de Melo
2022-09-29 18:01 ` Arnaldo Carvalho de Melo [this message]
2022-09-29 18:22   ` [PATCH 1/2] perf tools: Fix bison object compilation with clang 15 Namhyung Kim
2022-09-29 18:37     ` Arnaldo Carvalho de Melo
2022-09-29 19:24   ` Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YzXdjNNh+jbYDnYz@kernel.org \
    --to=acme@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).