diff options
author | John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> | 2019-09-26 15:45:06 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-26 15:45:05 +0200 |
commit | 944fcc0e62bb22b9f5da79909dfbda4371de1fc6 (patch) | |
tree | e7188351a930ee64bedf41565bac98b023545987 | |
parent | 657e09e79deabe6304ead7759a4fdcfeb5fd022b (diff) | |
download | Nim-944fcc0e62bb22b9f5da79909dfbda4371de1fc6.tar.gz |
Add build support for Linux/hppa (#12271)
* build.sh: Enable CPU detection for hppa * compiler: Add hppa as target architecture on Linux * lib/system: Add platform support for hppa
-rw-r--r-- | compiler/installer.ini | 2 | ||||
-rw-r--r-- | compiler/platform.nim | 7 | ||||
-rw-r--r-- | lib/system/platforms.nim | 2 | ||||
-rw-r--r-- | tools/niminst/buildsh.nimf | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/compiler/installer.ini b/compiler/installer.ini index e2a9380f3..5eec437d6 100644 --- a/compiler/installer.ini +++ b/compiler/installer.ini @@ -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 diff --git a/compiler/platform.nim b/compiler/platform.nim index cfe3e1f48..5b9c0450d 100644 --- a/compiler/platform.nim +++ b/compiler/platform.nim @@ -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 @@ -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), diff --git a/lib/system/platforms.nim b/lib/system/platforms.nim index 1c35eeb0d..6e39dc7f2 100644 --- a/lib/system/platforms.nim +++ b/lib/system/platforms.nim @@ -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 @@ -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 diff --git a/tools/niminst/buildsh.nimf b/tools/niminst/buildsh.nimf index 464c54594..9289feb90 100644 --- a/tools/niminst/buildsh.nimf +++ b/tools/niminst/buildsh.nimf @@ -162,6 +162,8 @@ case $ucpu in mycpu="powerpc" fi ;; + *hppa*) + mycpu="hppa" ;; *ia64*) mycpu="ia64" ;; *m68k*) |