Skip to content

Commit b36f511

Browse files
Add HPPA and sparc64 architectures (#20934)
* Add comments on CPU arch detection * Support HPPA/hppa/parisc64 CPU architecture * Support sparc64 CPU architecture * Update tools/niminst/makefile.nimf Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
1 parent 17ac8c3 commit b36f511

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/system/platforms.nim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
## Platform detection for NimScript. This module is included by the system module!
1111
## Do not import it directly!
1212

13+
# CPU architectures have alias names mapped in tools/niminst/makefile.nimf
14+
1315
type
1416
CpuPlatform* {.pure.} = enum ## the CPU this program will run on.
1517
none, ## unknown CPU

tools/niminst/makefile.nimf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ endif
1616

1717
target := ?{"$(binDir)/" & toLowerAscii(c.name)}
1818

19+
1920
ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
2021
ifeq ($(OS),Windows_NT)
2122
uos := windows
@@ -103,12 +104,18 @@ endif
103104
ifeq ($(ucpu),x86_64)
104105
mycpu = amd64
105106
endif
107+
ifeq ($(ucpu),parisc64)
108+
mycpu = hppa
109+
endif
106110
ifeq ($(ucpu),s390x)
107111
mycpu = s390x
108112
endif
109113
ifeq ($(ucpu),sparc)
110114
mycpu = sparc
111115
endif
116+
ifeq ($(ucpu),sparc64)
117+
mycpu = sparc64
118+
endif
112119
ifeq ($(ucpu),sun)
113120
mycpu = sparc
114121
endif

0 commit comments

Comments
 (0)