package/linux-tools: perf: explicitily disable rust

Since kernel v7.0, perf uses `rustc --version` to know whether or not
rust is available. If rust is installed on the host, this `rustc
--version` works fine but then the perf build fails with following error
(on aarch64) if host-rust isn't selected:

rustc  /home/bastien/embedded-linux-imx93-frdm-labs/integration/buildroot/output/build/linux-7.1.3/tools/perf/tests/workloads/code_with_type.a
error[E0463]: can't find crate for `std`
  |
  = note: the `aarch64-unknown-linux-gnu` target may not be installed
  = help: consider downloading the target with `rustup target add aarch64-unknown-linux-gnu`

error: aborting due to 1 previous error

In perf, rust is only used by one file of the test suite
(tools/perf/tests/workloads/code_with_type.rs) so we can safely disable
it.

Always use the NO_RUST flag to build perf.

Signed-off-by: Bastien Curutchet <bastien.curutchet@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Bastien Curutchet
2026-10-12 16:42:28 +02:00
committed by Thomas Petazzoni
parent aaafd2d6d9
commit ce34b0b208

View File

@@ -29,6 +29,7 @@ PERF_MAKE_FLAGS = \
NO_LIBPERL=1 \
NO_LIBPYTHON=1 \
NO_LIBBIONIC=1 \
NO_RUST=1 \
NO_SHELLCHECK=1
# We need to pass an argument to ld for setting the emulation when