aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2022-03-08 12:15:42 +1030
committerCédric Le Goater <clg@kaod.org>2022-03-15 12:12:26 +0100
commit3ffa501c4cfb58b6903014227247da1bdf79fd7e (patch)
tree182ad645b3b8d975e3103af0a1ff1a65c15712cb
parent908257e9d57307d1964f4da1679b288be616f0b0 (diff)
downloadskiboot-3ffa501c4cfb58b6903014227247da1bdf79fd7e.zip
skiboot-3ffa501c4cfb58b6903014227247da1bdf79fd7e.tar.gz
skiboot-3ffa501c4cfb58b6903014227247da1bdf79fd7e.tar.bz2
Makefile: Fix detection of cross compiler
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> Signed-off-by: Cédric Le Goater <clg@kaod.org>
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 625f212..f3942c4 100644
--- a/Makefile
+++ b/Makefile
@@ -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