projects
/
microwatt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8bc3e8e
)
don't cross compile when on Power
author
Dan Horák
<dan@danny.cz>
Sat, 24 Aug 2019 12:02:35 +0000
(14:02 +0200)
committer
Dan Horák
<dan@danny.cz>
Sat, 24 Aug 2019 12:02:35 +0000
(14:02 +0200)
hello_world/Makefile
patch
|
blob
|
history
diff --git
a/hello_world/Makefile
b/hello_world/Makefile
index 882b63aa338fb1af752bd09f6f8d1fb8aa1d9d38..12daea2d79fbaf09a422861b5459b790392f997e 100644
(file)
--- 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