perf build: Disable fewer flex warnings
authorIan Rogers <irogers@google.com>
Fri, 28 Jul 2023 06:49:15 +0000 (23:49 -0700)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Aug 2023 20:01:24 +0000 (17:01 -0300)
commit10c775afa5992d55be76fa40a6373a93751ba6b4
tree94a0afe2113a6cc109a5cb772c1ffc2bbf1d61a5
parenta9b451509565d40a5ca3b41c39a2b758cdbc5355
perf build: Disable fewer flex warnings

If flex is version 2.6.4, reduce the number of flex C warnings
disabled. Earlier flex versions have all C warnings disabled.

Committer notes:

Added this to the list of ignored warnings to get it building on
a Fedora 36 machine with flex 2.6.4:

  -Wno-misleading-indentation

Noticed when building with:

  $ make LLVM=1 -C tools/perf NO_BPF_SKEL=1 DEBUG=1

Take two:

We can't just try to canonicalize flex versions by just removing the
dots, as we end up with:

2.6.4 >= 2.5.37

becoming:

264 >= 2537

Failing the build on flex 2.5.37, so instead use the back to the past
added $(call version_ge3,$(FLEX_VERSION),2.6.4) variant to check for
that.

Making sure $(FLEX_VERSION) keeps the dots as we may want to use 'sort
-V' or something nicer when available everywhere.

Some other tweaks for other flex versions and combinations with gcc and
clang versions were added, notes on the patch.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Eduard Zingerman <eddyz87@gmail.com>
Cc: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Tom Rix <trix@redhat.com>
Cc: bpf@vger.kernel.org
Cc: llvm@lists.linux.dev
Link: https://lore.kernel.org/r/20230728064917.767761-5-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/Build