Skip to content

Commit

Permalink
build: remove support for s390 (but not s390x)
Browse files Browse the repository at this point in the history
Upstream V8 removed support for s390 earlier this year and it's known
to no longer build. Remove the support from our build scripts.

Fixes: #28866
PR-URL: #28883
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
bnoordhuis authored and targos committed Aug 2, 2019
1 parent 3d51d30 commit 470db47
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 31 deletions.
4 changes: 0 additions & 4 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,6 @@
'cflags': [ '-m64', '-mminimal-toc' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="s390"', {
'cflags': [ '-m31', '-march=z196' ],
'ldflags': [ '-m31', '-march=z196' ],
}],
[ 'target_arch=="s390x"', {
'cflags': [ '-m64', '-march=z196' ],
'ldflags': [ '-m64', '-march=z196' ],
Expand Down
6 changes: 2 additions & 4 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix', 'cloudabi')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'mips64el', 'ppc',
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390', 's390x')
'ppc64', 'x32','x64', 'x86', 'x86_64', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
Expand Down Expand Up @@ -867,7 +867,6 @@ def host_arch_cc():
'__PPC64__' : 'ppc64',
'__PPC__' : 'ppc64',
'__x86_64__' : 'x64',
'__s390__' : 's390',
'__s390x__' : 's390x',
}

Expand All @@ -876,8 +875,7 @@ def host_arch_cc():
for i in matchup:
if i in k and k[i] != '0':
rtn = matchup[i]
if rtn != 's390':
break
break

if rtn == 'mipsel' and '_LP64' in k:
rtn = 'mips64el'
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl-cl_asm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
'includes': ['config/archs/linux-ppc64le/asm/openssl-cl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/asm/openssl-cl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/asm/openssl-cl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/asm/openssl-cl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl-cl_asm_avx2.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl-cl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/asm_avx2/openssl-cl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/asm_avx2/openssl-cl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/asm_avx2/openssl-cl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl-cl_no_asm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
'includes': ['config/archs/linux-ppc64le/no-asm/openssl-cl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/no-asm/openssl-cl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/no-asm/openssl-cl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/no-asm/openssl-cl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl_asm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
'includes': ['config/archs/linux-ppc64le/asm/openssl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/asm/openssl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/asm/openssl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/asm/openssl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl_asm_avx2.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
'includes': ['config/archs/linux-ppc64le/asm_avx2/openssl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/asm_avx2/openssl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/asm_avx2/openssl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/asm_avx2/openssl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 0 additions & 2 deletions deps/openssl/openssl_no_asm.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
'includes': ['config/archs/linux-ppc64le/no-asm/openssl.gypi'],
}, 'target_arch=="ppc64" and OS=="linux"', {
'includes': ['config/archs/linux-ppc64/no-asm/openssl.gypi'],
}, 'target_arch=="s390" and OS=="linux"', {
'includes': ['config/archs/linux32-s390x/no-asm/openssl.gypi'],
}, 'target_arch=="s390x" and OS=="linux"', {
'includes': ['config/archs/linux64-s390x/no-asm/openssl.gypi'],
}, 'target_arch=="arm" and OS=="linux"', {
Expand Down
2 changes: 1 addition & 1 deletion tools/v8_gypfiles/broken/standalone.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
}, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and host_arch!="s390" and host_arch!="s390x"', {
['host_arch!="ppc" and host_arch!="ppc64" and host_arch!="ppc64le" and host_arch!="s390x"', {
'host_clang%': 1,
}, {
'host_clang%': 0,
Expand Down
14 changes: 7 additions & 7 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
'conditions': [
['host_arch=="ia32" or host_arch=="x64" or \
host_arch=="ppc" or host_arch=="ppc64" or \
host_arch=="s390" or host_arch=="s390x" or \
host_arch=="s390x" or \
clang==1', {
'variables': {
'host_cxx_is_biarch%': 1,
Expand All @@ -151,7 +151,7 @@
},
}],
['target_arch=="ia32" or target_arch=="x64" or \
target_arch=="ppc" or target_arch=="ppc64" or target_arch=="s390" or \
target_arch=="ppc" or target_arch=="ppc64" or \
target_arch=="s390x" or clang==1', {
'variables': {
'target_cxx_is_biarch%': 1,
Expand Down Expand Up @@ -302,7 +302,7 @@
'V8_TARGET_ARCH_ARM64',
],
}],
['v8_target_arch=="s390" or v8_target_arch=="s390x"', {
['v8_target_arch=="s390x"', {
'defines': [
'V8_TARGET_ARCH_S390',
],
Expand All @@ -320,7 +320,7 @@
'cflags': [ '-march=z196' ],
}],
],
}], # s390
}], # s390x
['v8_target_arch=="ppc" or v8_target_arch=="ppc64"', {
'defines': [
'V8_TARGET_ARCH_PPC',
Expand Down Expand Up @@ -1045,13 +1045,13 @@
or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
(v8_target_arch=="arm" or v8_target_arch=="ia32" or \
v8_target_arch=="mips" or v8_target_arch=="mipsel" or \
v8_target_arch=="ppc" or v8_target_arch=="s390")', {
v8_target_arch=="ppc")', {
'target_conditions': [
['_toolset=="host"', {
'conditions': [
['host_cxx_is_biarch==1', {
'conditions': [
['host_arch=="s390" or host_arch=="s390x"', {
['host_arch=="s390x"', {
'cflags': [ '-m31' ],
'ldflags': [ '-m31' ]
},{
Expand All @@ -1069,7 +1069,7 @@
'conditions': [
['target_cxx_is_biarch==1', {
'conditions': [
['host_arch=="s390" or host_arch=="s390x"', {
['host_arch=="s390x"', {
'cflags': [ '-m31' ],
'ldflags': [ '-m31' ]
},{
Expand Down
6 changes: 3 additions & 3 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@
'<(V8_ROOT)/src/builtins/ppc/builtins-ppc.cc',
],
}],
['v8_target_arch=="s390" or v8_target_arch=="s390x"', {
['v8_target_arch=="s390x"', {
'sources': [
'<(V8_ROOT)/src/builtins/s390/builtins-s390.cc',
],
Expand Down Expand Up @@ -2187,7 +2187,7 @@
'<(V8_ROOT)/src/wasm/baseline/ppc/liftoff-assembler-ppc.h',
],
}],
['v8_target_arch=="s390" or v8_target_arch=="s390x"', {
['v8_target_arch=="s390x"', {
'sources': [ ### gcmole(arch:s390) ###
'<(V8_ROOT)/src/compiler/backend/s390/code-generator-s390.cc',
'<(V8_ROOT)/src/compiler/backend/s390/instruction-codes-s390.h',
Expand Down Expand Up @@ -2298,7 +2298,7 @@
}],
# Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
# to implement atomic memory access
['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "ppc64", "s390", "s390x"]', {
['v8_current_cpu in ["mips", "mipsel", "mips64", "mips64el", "ppc", "ppc64", "s390x"]', {
'link_settings': {
'libraries': ['-latomic', ],
},
Expand Down

0 comments on commit 470db47

Please sign in to comment.