Re: [PATCH v3 08/12] perf tests: Silence the libbfd probe in build-test

From: Ian Rogers

Date: Sun Nov 15 2026 - 16:48:12 EST


On Sat, Nov 14, 2026 at 5:41 PM Arnaldo Carvalho de Melo
<acme@xxxxxxxxxx> wrote:
>
> build-test evaluates the libbfd probe at parse time and the compiler's
> stderr isn't captured by $(shell ...), so without binutils-devel it
> prints "bfd.h: No such file or directory" once per tests/make
> invocation, five times per run.
>
> Redirect the compiler's stderr; the empty result still skips the
> nondistro tests as intended.
>
> Fixes: 523471c5163659c6 ("perf build: Skip nondistro build test if libbfd is old")
> Cc: James Clark <james.clark@xxxxxxxxxx>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

Reviewed-by: Ian Rogers <irogers@xxxxxxxxxx>

Thanks,
Ian

> ---
> tools/perf/tests/make | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/tests/make b/tools/perf/tests/make
> index 7524de5228029e7e..e6d7ac49b5b1693d 100644
> --- a/tools/perf/tests/make
> +++ b/tools/perf/tests/make
> @@ -128,7 +128,7 @@ make_minimal += NO_SDT=1 NO_JVMTI=1 NO_LIBZSTD=1
> make_minimal += NO_CAPSTONE=1
>
> # binutils 2_42 and newer have bfd_thread_init()
> -new_libbfd := $(shell echo '#include <bfd.h>' | $(CC) -E -x c - | grep bfd_thread_init)
> +new_libbfd := $(shell echo '#include <bfd.h>' | $(CC) -E -x c - 2>/dev/null | grep bfd_thread_init)
>
> # Whether libLLVM can be built, which needs the llvm-devel/llvm-dev headers and
> # libraries of version 13 or newer, not just llvm-config. This mirrors the
> --
> 2.56.0
>