[Skiboot] [PATCH] Makefile: Search for distro-provided cross-compiler

Thiago Jung Bauermann bauerman at linux.ibm.com
Wed Jan 15 05:07:30 AEDT 2020

Search for powerpc64-linux-gcc in PATH and if not found, also search for
powerpc64-linux-gnu-gcc. The latter can be installed from official distro
packages by at least Debian, Fedora and Ubuntu.

Signed-off-by: Thiago Jung Bauermann <bauerman at linux.ibm.com>
 Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Makefile b/Makefile
index f938a062..3b1f36a0 100644
--- a/Makefile
+++ b/Makefile
@@ -16,8 +16,13 @@ ifdef CROSS_COMPILE
 ifneq ("$(ARCH)", "ppc64")
 ifneq ("$(ARCH)", "ppc64le")
+ifneq ($(shell which powerpc64-linux-gcc 2> /dev/null),)
 	CROSS ?= powerpc64-linux-
+ifneq ($(shell which powerpc64-linux-gnu-gcc 2> /dev/null),)
+	CROSS ?= powerpc64-linux-gnu-

More information about the Skiboot mailing list