From 2d7994dc12af89648770b1b707af0efb40a1f400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Sat, 24 Aug 2019 14:02:35 +0200 Subject: [PATCH] don't cross compile when on Power --- hello_world/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hello_world/Makefile b/hello_world/Makefile index 882b63a..12daea2 100644 --- a/hello_world/Makefile +++ b/hello_world/Makefile @@ -1,4 +1,10 @@ -CROSS_COMPILE = powerpc64le-linux- +ARCH = $(shell uname -m) +ifneq ("$(ARCH)", "ppc64") +ifneq ("$(ARCH)", "ppc64le") + CROSS_COMPILE = powerpc64le-linux- + endif + endif + CC = $(CROSS_COMPILE)gcc LD = $(CROSS_COMPILE)ld OBJCOPY = $(CROSS_COMPILE)objcopy