From: Dan HorĂ¡k Date: Sat, 24 Aug 2019 12:02:35 +0000 (+0200) Subject: don't cross compile when on Power X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d7994dc12af89648770b1b707af0efb40a1f400;p=microwatt.git don't cross compile when on Power --- 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