summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2022-11-28 18:33:09 +0000
committerGitHub <noreply@github.com>2022-11-28 13:33:09 -0500
commit8a68ed65d00d456198c8724b8e579a929233419b (patch)
tree12cb347ba2d51d47385399ed24c8d0698efb36a9
parentd26b1232ee7a69c2a71db81aa0185499321c54fe (diff)
downloadNim-8a68ed65d00d456198c8724b8e579a929233419b.tar.gz
Support IBM Z architecture (#20943)
-rw-r--r--lib/system/platforms.nim4
-rw-r--r--tools/niminst/makefile.nimf3
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/system/platforms.nim b/lib/system/platforms.nim
index b4c9f1f06..18d61b93c 100644
--- a/lib/system/platforms.nim
+++ b/lib/system/platforms.nim
@@ -37,7 +37,8 @@ type
     riscv64,                   ## RISC-V 64-bit processor
     wasm32,                    ## WASM, 32-bit
     e2k,                       ## MCST Elbrus 2000
-    loongarch64                ## LoongArch 64-bit processor
+    loongarch64,               ## LoongArch 64-bit processor
+    s390x                      ## IBM Z
 
   OsPlatform* {.pure.} = enum ## the OS this program will run on.
     none, dos, windows, os2, linux, morphos, skyos, solaris,
@@ -97,5 +98,6 @@ const
                elif defined(wasm32): CpuPlatform.wasm32
                elif defined(e2k): CpuPlatform.e2k
                elif defined(loongarch64): CpuPlatform.loongarch64
+               elif defined(s390x): CpuPlatform.s390x
                else: CpuPlatform.none
     ## the CPU this program will run on.
diff --git a/tools/niminst/makefile.nimf b/tools/niminst/makefile.nimf
index 99dd78176..46b4892a0 100644
--- a/tools/niminst/makefile.nimf
+++ b/tools/niminst/makefile.nimf
@@ -103,6 +103,9 @@ endif
 ifeq ($(ucpu),x86_64)
   mycpu = amd64
 endif
+ifeq ($(ucpu),s390x)
+  mycpu = s390x
+endif
 ifeq ($(ucpu),sparc)
   mycpu = sparc
 endif