@@ -16,13 +16,13 @@ ifdef CROSS_COMPILE
endif
ifneq ("$(ARCH)", "ppc64")
ifneq ("$(ARCH)", "ppc64le")
-ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),)
+ifneq ($(shell command -v powerpc64-linux-gcc 2> /dev/null),)
CROSS ?= powerpc64-linux-
-else ifneq ($(shell which powerpc64le-linux-gcc 2> /dev/null),)
+else ifneq ($(shell command -v powerpc64le-linux-gcc 2> /dev/null),)
CROSS ?= powerpc64le-linux-
-else ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),)
+else ifneq ($(shell command -v powerpc64-linux-gnu-gcc 2> /dev/null),)
CROSS ?= powerpc64-linux-gnu-
-else ifneq ($(shell which powerpc64le-linux-gnu-gcc 2> /dev/null),)
+else ifneq ($(shell command -v powerpc64le-linux-gnu-gcc 2> /dev/null),)
CROSS ?= powerpc64le-linux-gnu-
endif
endif
The Fedora containers don't have 'which' installed. This means the detection of the cross compiler gives false negatives, leaving CROSS undefined. Instead use command -v, which outputs the path of the executable if it exists. Fixes: 9cd556ca1e5f ("Makefile: Search for distro-provided cross-compiler") Signed-off-by: Joel Stanley <joel@jms.id.au> --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)