]> git.baikalelectronics.ru Git - kernel.git/commit
perf python: Fix build when PYTHON_CONFIG is user supplied
authorJames Clark <james.clark@arm.com>
Thu, 28 Jul 2022 09:39:46 +0000 (10:39 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Sat, 27 Aug 2022 14:55:16 +0000 (11:55 -0300)
commitbb7421abb53d824e92ef2e47e3e6a7fcd2dfb655
treee7569fe858a80845cf487d1e78623b04a4cf17e7
parentba310d2a27daea17da87cbd01a9fb2d5eddfec06
perf python: Fix build when PYTHON_CONFIG is user supplied

The previous change to Python autodetection had a small mistake where
the auto value was used to determine the Python binary, rather than the
user supplied value. The Python binary is only used for one part of the
build process, rather than the final linking, so it was producing
correct builds in most scenarios, especially when the auto detected
value matched what the user wanted, or the system only had a valid set
of Pythons.

Change it so that the Python binary path is derived from either the
PYTHON_CONFIG value or PYTHON value, depending on what is specified by
the user. This was the original intention.

This error was spotted in a build failure an odd cross compilation
environment after commit df399fa9eb82c1d4 ("perf python: Prefer
python3") was merged.

Fixes: 020a4c47241964cf ("perf tools: Use Python devtools for version autodetection rather than runtime")
Signed-off-by: James Clark <james.clark@arm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220728093946.1337642-1-james.clark@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.config