diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2019-06-01 10:45:44 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-06-01 10:45:44 +0200 |
commit | af0ae5830f4e62c48938093e82e8db708f47b81e (patch) | |
tree | 44b8174d61a53b5decb989b0ec1b0e3128e75814 | |
parent | 40c5509a02c74740e020336708c3f26c838e36f7 (diff) | |
download | Nim-af0ae5830f4e62c48938093e82e8db708f47b81e.tar.gz |
Add build support for Linux/sparc64 (#11365)
* compiler: Add sparc64 as target architecture on Linux * build.sh: Use getconf for bitness detection on Linux/sparc The isainfo utility is specific to Solaris and not available on Linux/sparc. While getconf exists on Solaris as well, it does not always seem to match the bitness reported by isainfo on Solaris and isainfo should therefore be preferred on Solaris.
-rw-r--r-- | compiler/installer.ini | 2 | ||||
-rw-r--r-- | tools/niminst/buildsh.nimf | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/compiler/installer.ini b/compiler/installer.ini index 63790d90f..d7b19ec29 100644 --- a/compiler/installer.ini +++ b/compiler/installer.ini @@ -6,7 +6,7 @@ Name: "Nim" Version: "$version" Platforms: """ windows: i386;amd64 - linux: i386;amd64;powerpc64;arm;sparc;mips;mipsel;mips64;mips64el;powerpc;powerpc64el;arm64;riscv64 + linux: i386;amd64;powerpc64;arm;sparc;sparc64;mips;mipsel;mips64;mips64el;powerpc;powerpc64el;arm64;riscv64 macosx: i386;amd64;powerpc64 solaris: i386;amd64;sparc;sparc64 freebsd: i386;amd64 diff --git a/tools/niminst/buildsh.nimf b/tools/niminst/buildsh.nimf index 04ef35653..2a762d8d1 100644 --- a/tools/niminst/buildsh.nimf +++ b/tools/niminst/buildsh.nimf @@ -140,8 +140,12 @@ case $ucpu in mycpu="amd64" ;; *sparc*|*sun* ) mycpu="sparc" - if [ "$(isainfo -b)" = "64" ]; then - mycpu="sparc64" + if [ "$myos" = "linux" ] ; then + if [ "$(getconf LONG_BIT)" = "64" ]; then + mycpu="sparc64" + elif [ "$(isainfo -b)" = "64" ]; then + mycpu="sparc64" + fi fi ;; *ppc64le* ) |