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>
This commit is contained in:
parent
17ac8c31bf
commit
b36f5119ae
2 changed files with 9 additions and 0 deletions
|
|
@ -10,6 +10,8 @@
|
||||||
## Platform detection for NimScript. This module is included by the system module!
|
## Platform detection for NimScript. This module is included by the system module!
|
||||||
## Do not import it directly!
|
## Do not import it directly!
|
||||||
|
|
||||||
|
# CPU architectures have alias names mapped in tools/niminst/makefile.nimf
|
||||||
|
|
||||||
type
|
type
|
||||||
CpuPlatform* {.pure.} = enum ## the CPU this program will run on.
|
CpuPlatform* {.pure.} = enum ## the CPU this program will run on.
|
||||||
none, ## unknown CPU
|
none, ## unknown CPU
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ endif
|
||||||
|
|
||||||
target := ?{"$(binDir)/" & toLowerAscii(c.name)}
|
target := ?{"$(binDir)/" & toLowerAscii(c.name)}
|
||||||
|
|
||||||
|
|
||||||
ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
|
ucpu := $(shell sh -c 'uname -m | tr "[:upper:]" "[:lower:]"')
|
||||||
ifeq ($(OS),Windows_NT)
|
ifeq ($(OS),Windows_NT)
|
||||||
uos := windows
|
uos := windows
|
||||||
|
|
@ -103,12 +104,18 @@ endif
|
||||||
ifeq ($(ucpu),x86_64)
|
ifeq ($(ucpu),x86_64)
|
||||||
mycpu = amd64
|
mycpu = amd64
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ucpu),parisc64)
|
||||||
|
mycpu = hppa
|
||||||
|
endif
|
||||||
ifeq ($(ucpu),s390x)
|
ifeq ($(ucpu),s390x)
|
||||||
mycpu = s390x
|
mycpu = s390x
|
||||||
endif
|
endif
|
||||||
ifeq ($(ucpu),sparc)
|
ifeq ($(ucpu),sparc)
|
||||||
mycpu = sparc
|
mycpu = sparc
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ucpu),sparc64)
|
||||||
|
mycpu = sparc64
|
||||||
|
endif
|
||||||
ifeq ($(ucpu),sun)
|
ifeq ($(ucpu),sun)
|
||||||
mycpu = sparc
|
mycpu = sparc
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue