From a62f2daeb09c1003f13543ff45702efb9fd4e21f Mon Sep 17 00:00:00 2001 From: Neale Ferguson Date: Wed, 1 May 2019 11:52:33 -0400 Subject: [PATCH] Add S390x as a supported platform (#432) Add support for s390x --- doc/src/reference.adoc | 2 +- src/tools/builtin.py | 8 +++++++- src/tools/features/architecture-feature.jam | 3 +++ src/tools/features/instruction-set-feature.jam | 3 +++ src/tools/gcc.jam | 4 ++++ src/tools/gcc.py | 4 ++++ 6 files changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/src/reference.adoc b/doc/src/reference.adoc index bc7e9310d..e943339fd 100644 --- a/doc/src/reference.adoc +++ b/doc/src/reference.adoc @@ -425,7 +425,7 @@ for details of cross-compilation. [[bbv2.builtin.features.architecture]]`architecture`:: *Allowed values:* `x86`, `ia64`, `sparc`, `power`, `mips1`, `mips2`, `mips3`, `mips4`, `mips32`, `mips32r2`, `mips64`, `parisc`, `arm`, -`combined`, `combined-x86-power`. +`s390x`, `combined`, `combined-x86-power`. + The `architecture` features specifies the general processor family to generate code for. diff --git a/src/tools/builtin.py b/src/tools/builtin.py index 1a80c3fc2..a417f13e0 100644 --- a/src/tools/builtin.py +++ b/src/tools/builtin.py @@ -265,6 +265,9 @@ def register_globals (): # Advanced RISC Machines 'arm', + # z Systems (aka s390x) + 's390x', + # Combined architectures for platforms/toolsets that support building for # multiple architectures at once. "combined" would be the default multi-arch # for the toolset. @@ -310,7 +313,10 @@ def register_globals (): # Advanced RISC Machines 'armv2', 'armv2a', 'armv3', 'armv3m', 'armv4', 'armv4t', 'armv5', - 'armv5t', 'armv5te', 'armv6', 'armv6j', 'iwmmxt', 'ep9312'], + 'armv5t', 'armv5te', 'armv6', 'armv6j', 'iwmmxt', 'ep9312', + + # z Systems (aka s390x) + 'z196', 'zEC12', 'z13', 'z13', 'z14'], ['propagated', 'optional']) diff --git a/src/tools/features/architecture-feature.jam b/src/tools/features/architecture-feature.jam index 54f9a8f4a..9f0e0b53b 100644 --- a/src/tools/features/architecture-feature.jam +++ b/src/tools/features/architecture-feature.jam @@ -33,6 +33,9 @@ feature.feature architecture # RISC-V riscv + # z Systems (aka s390x) + s390x + # Combined architectures for platforms/toolsets that support building for # multiple architectures at once. "combined" would be the default multi-arch # for the toolset. diff --git a/src/tools/features/instruction-set-feature.jam b/src/tools/features/instruction-set-feature.jam index 080b01d4a..ccea5ce37 100644 --- a/src/tools/features/instruction-set-feature.jam +++ b/src/tools/features/instruction-set-feature.jam @@ -42,6 +42,9 @@ feature.feature instruction-set # Advanced RISC Machines armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5t armv5te armv6 armv6j iwmmxt ep9312 armv7 armv7s + + # z Systems (aka s390x) + z196 zEC12 z13 z14 : propagated optional diff --git a/src/tools/gcc.jam b/src/tools/gcc.jam index d8a18c76e..ecc45c260 100644 --- a/src/tools/gcc.jam +++ b/src/tools/gcc.jam @@ -1300,5 +1300,9 @@ cpu-flags gcc OPTIONS : power : rios1 : -mcpu=rios1 ; cpu-flags gcc OPTIONS : power : rios2 : -mcpu=rios2 ; cpu-flags gcc OPTIONS : power : rsc : -mcpu=rsc ; cpu-flags gcc OPTIONS : power : rs64a : -mcpu=rs64 ; +cpu-flags gcc OPTIONS : s390x : z196 : -march=z196 ; +cpu-flags gcc OPTIONS : s390x : zEC12 : -march=zEC12 ; +cpu-flags gcc OPTIONS : s390x : z13 : -march=z13 ; +cpu-flags gcc OPTIONS : s390x : z14 : -march=z14 ; # AIX variant of RS/6000 & PowerPC toolset.flags gcc AROPTIONS 64/aix : "-X64" ; diff --git a/src/tools/gcc.py b/src/tools/gcc.py index 2fcf18520..01fb793ff 100644 --- a/src/tools/gcc.py +++ b/src/tools/gcc.py @@ -860,6 +860,10 @@ cpu_flags('gcc', 'OPTIONS', 'power', 'rios1', ['-mcpu=rios1']) cpu_flags('gcc', 'OPTIONS', 'power', 'rios2', ['-mcpu=rios2']) cpu_flags('gcc', 'OPTIONS', 'power', 'rsc', ['-mcpu=rsc']) cpu_flags('gcc', 'OPTIONS', 'power', 'rs64a', ['-mcpu=rs64']) +cpu_flags('gcc', 'OPTIONS', 's390x', 'z196', ['-march=z196']) +cpu_flags('gcc', 'OPTIONS', 's390x', 'zEC12', ['-march=zEC12']) +cpu_flags('gcc', 'OPTIONS', 's390x', 'z13', ['-march=z13']) +cpu_flags('gcc', 'OPTIONS', 's390x', 'z14', ['-march=z14']) # AIX variant of RS/6000 & PowerPC flags('gcc', 'OPTIONS', ['power/32/aix'], ['-maix32']) flags('gcc', 'OPTIONS', ['power/64/aix'], ['-maix64'])