From 1091c2f07e8a02e20a14cd28b283297b7bce13bb Mon Sep 17 00:00:00 2001 From: joransiu Date: Thu, 14 Jan 2016 09:16:10 -0800 Subject: [PATCH] S390: Makefile + Build Toolchain Updates This is the first of several commits to contribute Linux on z Systems (s390/s390x) port of V8. We will be breaking up the changes into several (hopefully) logical commits. This commit contains the changes to V8 Makefile and build toolchains to introduce S390 macros and compiler options. Just for awareness for reviewers is that s390 is 31-bit (not 32!) big-endian platform on Linux on z. (MSB of address is used to distinguish between 24-bit vs 31-bit addressing!) s390x is 64-bit Linux on z. Names follow the general linux convention on the platform. A quick roadmap on upcoming commits: - Add \#include of S390 header files in common files - S390 related tests + tooling changes - printf macro for printing size_t values. - S390 platform-specific code generation code (bulk of changes!) R=danno@chromium.org,svenpanne@chromium.org,michael_dawson@ca.ibm.com,jyan@ca.ibm.com,mtbrandyberry@ca.ibm.com BUG= Review URL: https://codereview.chromium.org/1585813002 Cr-Commit-Position: refs/heads/master@{#33304} --- BUILD.gn | 10 +++++++++ Makefile | 3 ++- build/standalone.gypi | 2 +- build/toolchain.gypi | 49 ++++++++++++++++++++++++++++++++++------- src/base/build_config.h | 21 +++++++++++++++++- 5 files changed, 74 insertions(+), 11 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index c6bb4b522a..88097133c4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -171,12 +171,22 @@ config("toolchain") { if (v8_target_arch == "mips64el") { defines += [ "V8_TARGET_ARCH_MIPS64" ] } + if (v8_target_arch == "s390") { + defines += [ "V8_TARGET_ARCH_S390" ] + } + if (v8_target_arch == "s390x") { + defines += [ + "V8_TARGET_ARCH_S390", + "V8_TARGET_ARCH_S390X", + ] + } if (v8_target_arch == "x86") { defines += [ "V8_TARGET_ARCH_IA32" ] } if (v8_target_arch == "x64") { defines += [ "V8_TARGET_ARCH_X64" ] } + if (is_win) { defines += [ "WIN32" ] # TODO(jochen): Support v8_enable_prof. diff --git a/Makefile b/Makefile index c2caf40f4d..6ae9b24576 100644 --- a/Makefile +++ b/Makefile @@ -238,7 +238,8 @@ endif # Architectures and modes to be compiled. Consider these to be internal # variables, don't override them (use the targets instead). -ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64 mips64el x87 ppc ppc64 +ARCHES = ia32 x64 x32 arm arm64 mips mipsel mips64 mips64el x87 ppc ppc64 \ + s390 s390x DEFAULT_ARCHES = ia32 x64 arm MODES = release debug optdebug DEFAULT_MODES = release debug diff --git a/build/standalone.gypi b/build/standalone.gypi index b2bd4b4078..273d72b744 100644 --- a/build/standalone.gypi +++ b/build/standalone.gypi @@ -117,7 +117,7 @@ }, { 'gomadir': '