From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: James Clark <james.clark@arm.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>, Kan Liang <kan.liang@linux.intel.com>,
Eduard Zingerman <eddyz87@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Gaosheng Cui <cuigaosheng1@huawei.com>,
Rob Herring <robh@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v1 4/6] perf build: Disable fewer flex warnings
Date: Fri, 28 Jul 2023 15:43:14 -0300 [thread overview]
Message-ID: <ZMQMQoCtBytgwB4i@kernel.org> (raw)
In-Reply-To: <ZMQEfIi/BYwpDIEB@kernel.org>
Em Fri, Jul 28, 2023 at 03:10:05PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Jul 28, 2023 at 08:26:54AM -0700, Ian Rogers escreveu:
> > On Fri, Jul 28, 2023 at 7:02 AM Arnaldo Carvalho de Melo
> > > I added this to the patch to get it moving:
> > >
> > > make: Leaving directory '/var/home/acme/git/perf-tools-next/tools/perf'
> > > ⬢[acme@toolbox perf-tools-next]$ git diff
> > > diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> > > index 32239c4b0393c319..afa93eff495811cf 100644
> > > --- a/tools/perf/util/Build
> > > +++ b/tools/perf/util/Build
> > > @@ -281,7 +281,7 @@ $(OUTPUT)util/bpf-filter-bison.c $(OUTPUT)util/bpf-filter-bison.h: util/bpf-filt
> > >
> > > FLEX_GE_264 := $(shell expr $(shell $(FLEX) --version | sed -e 's/flex \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 264)
> > > ifeq ($(FLEX_GE_264),1)
> > > - flex_flags := -Wno-redundant-decls -Wno-switch-default -Wno-unused-function
> > > + flex_flags := -Wno-redundant-decls -Wno-switch-default -Wno-unused-function -Wno-misleading-indentation
> > > else
> > > flex_flags := -w
> > > endif
> > > ⬢[acme@toolbox perf-tools-next]$
> > >
> > >
> > > > 1 error generated.
> > > > make[4]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:97: util/parse-events-flex.o] Error 1
> > > > make[4]: *** Waiting for unfinished jobs....
> > > > LD util/scripting-engines/perf-in.o
> > > > make[3]: *** [/var/home/acme/git/perf-tools-next/tools/build/Makefile.build:140: util] Error 2
> > > > make[2]: *** [Makefile.perf:682: perf-in.o] Error 2
> > > > make[2]: *** Waiting for unfinished jobs....
> > > > CC pmu-events/pmu-events.o
> > > > LD pmu-events/pmu-events-in.o
> > > > make[1]: *** [Makefile.perf:242: sub-make] Error 2
> > > > make: *** [Makefile:70: all] Error 2
> > > >
> > > > ⬢[acme@toolbox perf-tools-next]$ clang --version
> > > > clang version 14.0.5 (Fedora 14.0.5-2.fc36)
> > > > Target: x86_64-redhat-linux-gnu
> > > > Thread model: posix
> > > > InstalledDir: /usr/bin
> > > > ⬢[acme@toolbox perf-tools-next]$
> >
> > Thanks James/Arnaldo, I was trying to be aggressive in having more
> > flags, but it seems too aggressive. We should probably bring back the
> > logic to make this flag only added if it is supported:
> > CC_HASNT_MISLEADING_INDENTATION := $(shell echo "int main(void) {
> > return 0 }" | $(CC) -Werror -Wno-misleading-indentation -o /dev/null
> > -xc - 2>&1 | grep -q -- -Wno-misleading-indentation ; echo $$?)
> > ifeq ($(CC_HASNT_MISLEADING_INDENTATION), 1)
> > flex_flags += -Wno-misleading-indentation
> > endif
> > Arnaldo, is the misleading indentation in the bison generated code or
> > something copy-pasted from the parse-events.l ? If the latter we may
> > be able to fix the .l file to keep the warning.
>
> I haven't checked, lemme do it now.
It comes directly from flex's m4 files:
https://github.com/westes/flex/blob/master/src/c99-flex.skl#L2044
So I'll keep the -Wno-misleading-indentation, ok?
- Arnaldo
next prev parent reply other threads:[~2023-07-28 18:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 6:49 [PATCH v1 0/6] Simplify C/C++ compiler flags Ian Rogers
2023-07-28 6:49 ` [PATCH v1 1/6] perf bpf-loader: Remove unneeded diagnostic pragma Ian Rogers
2023-07-28 8:56 ` James Clark
2023-07-28 6:49 ` [PATCH v1 2/6] perf build: Don't always set -funwind-tables and -ggdb3 Ian Rogers
2023-07-28 8:56 ` James Clark
2023-07-28 6:49 ` [PATCH v1 3/6] perf build: Add Wextra for C++ compilation Ian Rogers
2023-07-28 8:57 ` James Clark
2023-07-28 6:49 ` [PATCH v1 4/6] perf build: Disable fewer flex warnings Ian Rogers
2023-07-28 8:50 ` James Clark
2023-07-28 13:59 ` Arnaldo Carvalho de Melo
2023-07-28 14:02 ` Arnaldo Carvalho de Melo
2023-07-28 15:26 ` Ian Rogers
2023-07-28 18:10 ` Arnaldo Carvalho de Melo
2023-07-28 18:43 ` Arnaldo Carvalho de Melo [this message]
[not found] ` <CAP-5=fUOD4hgQBmXjQh0HujO_39zQQhv_Wv5oirgAC4N8Ao1nw@mail.gmail.com>
2023-07-31 21:16 ` Arnaldo Carvalho de Melo
2023-08-01 2:29 ` Arnaldo Carvalho de Melo
2023-07-28 6:49 ` [PATCH v1 5/6] perf build: Disable fewer bison warnings Ian Rogers
2023-07-28 6:49 ` [PATCH v1 6/6] perf build: Remove -Wno-redundant-decls in 2 cases Ian Rogers
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=ZMQMQoCtBytgwB4i@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=cuigaosheng1@huawei.com \
--cc=eddyz87@gmail.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=trix@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.