summary refs log tree commit diff stats
path: root/tools/niminst
diff options
context:
space:
mode:
Diffstat (limited to 'tools/niminst')
-rw-r--r--tools/niminst/buildsh.nimf8
1 files changed, 6 insertions, 2 deletions
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* )