Skip to content

Commit

Permalink
Add build support for Linux/hppa (nim-lang#12271)
Browse files Browse the repository at this point in the history
* build.sh: Enable CPU detection for hppa
* compiler: Add hppa as target architecture on Linux
* lib/system: Add platform support for hppa
  • Loading branch information
glaubitz authored and alehander92 committed Dec 2, 2019
1 parent 47f189d commit 4e6f367
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion compiler/installer.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Name: "Nim"
Version: "$version"
Platforms: """
windows: i386;amd64
linux: i386;ia64;alpha;amd64;powerpc64;arm;sparc;sparc64;m68k;mips;mipsel;mips64;mips64el;powerpc;powerpc64el;arm64;riscv64
linux: i386;hppa;ia64;alpha;amd64;powerpc64;arm;sparc;sparc64;m68k;mips;mipsel;mips64;mips64el;powerpc;powerpc64el;arm64;riscv64
macosx: i386;amd64;powerpc64
solaris: i386;amd64;sparc;sparc64
freebsd: i386;amd64;powerpc64
Expand Down
7 changes: 4 additions & 3 deletions compiler/platform.nim
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ type
TSystemCPU* = enum # Also add CPU for in initialization section and
# alias conditionals to condsyms (end of module).
cpuNone, cpuI386, cpuM68k, cpuAlpha, cpuPowerpc, cpuPowerpc64,
cpuPowerpc64el, cpuSparc, cpuVm, cpuIa64, cpuAmd64, cpuMips, cpuMipsel,
cpuArm, cpuArm64, cpuJS, cpuNimVM, cpuAVR, cpuMSP430, cpuSparc64,
cpuMips64, cpuMips64el, cpuRiscV64, cpuWasm32
cpuPowerpc64el, cpuSparc, cpuVm, cpuHppa, cpuIa64, cpuAmd64, cpuMips,
cpuMipsel, cpuArm, cpuArm64, cpuJS, cpuNimVM, cpuAVR, cpuMSP430,
cpuSparc64, cpuMips64, cpuMips64el, cpuRiscV64, cpuWasm32

type
TEndian* = enum
Expand All @@ -204,6 +204,7 @@ const
(name: "powerpc64el", intSize: 64, endian: littleEndian, floatSize: 64,bit: 64),
(name: "sparc", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),
(name: "vm", intSize: 32, endian: littleEndian, floatSize: 64, bit: 32),
(name: "hppa", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),
(name: "ia64", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64),
(name: "amd64", intSize: 64, endian: littleEndian, floatSize: 64, bit: 64),
(name: "mips", intSize: 32, endian: bigEndian, floatSize: 64, bit: 32),
Expand Down
2 changes: 2 additions & 0 deletions lib/system/platforms.nim
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type
powerpc64el, ## Little Endian 64 bit PowerPC
sparc, ## Sparc based processor
sparc64, ## 64-bit Sparc based processor
hppa, ## HP PA-RISC
ia64, ## Intel Itanium
amd64, ## x86_64 (AMD64); 64 bit x86 compatible CPU
mips, ## Mips based processor
Expand Down Expand Up @@ -78,6 +79,7 @@ const
elif defined(powerpc64el): CpuPlatform.powerpc64el
elif defined(sparc): CpuPlatform.sparc
elif defined(sparc64): CpuPlatform.sparc64
elif defined(hppa): CpuPlatform.hppa
elif defined(ia64): CpuPlatform.ia64
elif defined(amd64): CpuPlatform.amd64
elif defined(mips): CpuPlatform.mips
Expand Down
2 changes: 2 additions & 0 deletions tools/niminst/buildsh.nimf
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ case $ucpu in
mycpu="powerpc"
fi
;;
*hppa*)
mycpu="hppa" ;;
*ia64*)
mycpu="ia64" ;;
*m68k*)
Expand Down

0 comments on commit 4e6f367

Please sign in to comment.