[Skiboot] [PATCH 3/3] Makefile: set CROSS based on arch

Wei Yang weiyang at linux.vnet.ibm.com
Tue Dec 2 17:24:16 AEDT 2014


CROSS is used to do the cross compile of skiboot on other platform, while this
variable is not necessary on ppc64. When this is set on ppc64, there would be
an error.

This patch sets the CROSS depends on the arch.

Signed-off-by: Wei Yang <weiyang at linux.vnet.ibm.com>
---
 Makefile |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 39c97d5..96c387f 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,12 @@
 # Prefix of cross toolchain, if anything
 # Example: CROSS= powerpc64-unknown-linux-gnu-
 #
-CROSS ?= powerpc64-linux-
+ARCH = $(shell uname -m)
+ifeq ("$(ARCH)", "ppc64")
+	CROSS ?=
+else
+	CROSS ?= powerpc64-linux-
+endif
 
 #
 # Set to enable SLW bits
-- 
1.7.9.5



More information about the Skiboot mailing list