linux-stable/tools/scripts
Jean-Philippe Brucker b7892f7d5c tools: Ignore errors from `which' when searching a GCC toolchain
When cross-building tools with clang, we run `which $(CROSS_COMPILE)gcc`
to detect whether a GCC toolchain provides the standard libraries. It is
only a helper because some distros put libraries where LLVM does not
automatically find them. On other systems, LLVM detects the libc
automatically and does not need this. There, it is completely fine not
to have a GCC at all, but some versions of `which' display an error when
the command is not found:

  which: no aarch64-linux-gnu-gcc in ($PATH)

Since the error can safely be ignored, throw it to /dev/null.

Fixes: cebdb73745 ("tools: Help cross-building with clang")
Reported-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/bpf/20220201093119.1713207-1-jean-philippe@linaro.org
2022-02-01 23:04:12 +01:00
..
Makefile.arch tools, build: Add RISC-V to HOSTARCH parsing 2021-11-01 17:08:21 +01:00
Makefile.include tools: Ignore errors from `which' when searching a GCC toolchain 2022-02-01 23:04:12 +01:00
utilities.mak tools: Move utilities.mak from perf to tools/scripts/ 2016-03-18 13:57:20 -03:00