summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2010-12-31 16:47:57 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2010-12-31 16:47:57 +0100
commit50e7ffe10d0bca1ef5b2d27ebc518b456035a18d (patch)
treec25c7f2ab1a256d0f6a6781015c9febfb9631314 /Makefile
parent23251c0c6ee9f7c0d3c4b20a5db9f51b4a0cc361 (diff)
fix native builds
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index d2dbfdbb9..e465732bb 100644
--- a/Makefile
+++ b/Makefile
@@ -203,6 +203,17 @@ NO_ERROR=0
-e 's/cris.*/cris/' \
-e 's/i[3-9]86/i386/' \
)" >>prereq.mk
+ @echo "HOSTARCH:=$$(${CC} -dumpmachine | sed -e s'/-.*//' \
+ -e 's/sparc.*/sparc/' \
+ -e 's/arm.*/arm/g' \
+ -e 's/m68k.*/m68k/' \
+ -e 's/v850.*/v850/g' \
+ -e 's/sh[234]/sh/' \
+ -e 's/mips-.*/mips/' \
+ -e 's/mipsel-.*/mipsel/' \
+ -e 's/cris.*/cris/' \
+ -e 's/i[3-9]86/x86/' \
+ )" >>prereq.mk
@echo 'HOSTCC:=${CC}' >>prereq.mk
@echo 'HOSTCFLAGS:=-O2' >>prereq.mk
@echo 'HOSTCXX:=${CXX}' >>prereq.mk