diff options
author | James Cowgill <jcowgill@users.noreply.github.com> | 2017-08-03 17:37:02 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-08-03 18:37:02 +0200 |
commit | fed1b0a0774e6b0b301fbe11cea70dbd0eac2c19 (patch) | |
tree | 961d159c07bd0be7f5dd66d4d386189ee379d007 /tools/niminst | |
parent | 57edf619fe4d3e826c9b8f151b0f639487ede81b (diff) | |
download | Nim-fed1b0a0774e6b0b301fbe11cea70dbd0eac2c19.tar.gz |
Add mips64 and mips64el CPU platforms (#5866)
Diffstat (limited to 'tools/niminst')
-rw-r--r-- | tools/niminst/buildsh.tmpl | 10 | ||||
-rw-r--r-- | tools/niminst/makefile.tmpl | 7 |
2 files changed, 14 insertions, 3 deletions
diff --git a/tools/niminst/buildsh.tmpl b/tools/niminst/buildsh.tmpl index e90ad97c0..956c5ead8 100644 --- a/tools/niminst/buildsh.tmpl +++ b/tools/niminst/buildsh.tmpl @@ -123,7 +123,15 @@ case $ucpu in *power*|*ppc* ) mycpu="powerpc" ;; *mips* ) - mycpu="mips" ;; + mycpu="$("$CC" -dumpmachine | sed 's/-.*//')" + case $mycpu in + mips|mipsel|mips64|mips64el) + ;; + *) + echo 2>&1 "Error: unknown MIPS target: $mycpu" + exit 1 + esac + ;; *arm*|*armv6l* ) mycpu="arm" ;; *aarch64* ) diff --git a/tools/niminst/makefile.tmpl b/tools/niminst/makefile.tmpl index c4e0be55e..2203d05e9 100644 --- a/tools/niminst/makefile.tmpl +++ b/tools/niminst/makefile.tmpl @@ -114,8 +114,11 @@ endif ifeq ($(ucpu),ppc) mycpu = ppc endif -ifeq ($(ucpu),mips) - mycpu = mips +ifneq (,$(filter $(ucpu), mips mips64)) + mycpu = $(shell /bin/sh -c '"$(CC)" -dumpmachine | sed "s/-.*//"') + ifeq (,$(filter $(mycpu), mips mipsel mips64 mips64el)) + $(error unknown MIPS target: $(mycpu)) + endif endif ifeq ($(ucpu),arm) mycpu = arm |