Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,12 @@ Build Changes

(Contributed by Victor Stinner in :issue:`42856`.)

* The discontinued 31/32-bit Linux s390 platform is no longer supported. The
31/32-bit IBM s390 architecture was discontinued in 1998 and superseded by
the 64-bit IBM s390x architecture. The 64-bit Linux s390x platform remains
supported.
(Contributed by Victor Stinner in :issue:`43179`.)


C API Changes
=============
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def test_triplet_in_ext_suffix(self):
import platform, re
machine = platform.machine()
suffix = sysconfig.get_config_var('EXT_SUFFIX')
if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc)', machine):
if re.match('(aarch64|arm|mips|ppc|powerpc|s390x|sparc)', machine):
self.assertTrue('linux' in suffix, suffix)
if re.match('(i[3-6]86|x86_64)$', machine):
if ctypes.sizeof(ctypes.c_char_p()) == 4:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The discontinued 31/32-bit Linux s390 platform is no longer supported. The
31/32-bit IBM s390 architecture was discontinued in 1998 and superseded by the
64-bit IBM s390x architecture. The 64-bit Linux s390x platform remains
supported. Patch by Victor Stinner.
6 changes: 3 additions & 3 deletions Modules/_ctypes/libffi_osx/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ ffi_prep_cif(
/* Perform a sanity check on the return type */
FFI_ASSERT_VALID_TYPE(cif->rtype);

/* x86-64 and s390 stack space allocation is handled in prep_machdep. */
#if !defined M68K && !defined __x86_64__ && !defined S390 && !defined PA
/* x86-64 and s390x stack space allocation is handled in prep_machdep. */
#if !defined M68K && !defined __x86_64__ && !defined PA
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is in libffi_osx directory, so unrelated to support for s390 on Linux.
To verify correctness of changes in this file, somebody would have to provide relevant output from compiler on Mac OS X on s390 and s390x.
E.g. gcc on Linux on s390x defines both __s390__ and __s390x__ constants (gcc-s390x.txt).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this comment. Does macOS / Darwin even compile on s390? "Mach" here properly refers to the Mach microkernel, not to macOS support.

/* Make space for the return structure pointer */
if (cif->rtype->type == FFI_TYPE_STRUCT
#ifdef SPARC
Expand Down Expand Up @@ -200,7 +200,7 @@ ffi_prep_cif(

bytes += STACK_ARG_SIZE((*ptr)->size);
}
#elif !defined __x86_64__ && !defined S390 && !defined PA
#elif !defined __x86_64__ && !defined PA
#ifdef SPARC
if (((*ptr)->type == FFI_TYPE_STRUCT
&& ((*ptr)->size > 16 || cif->abi != FFI_V9))
Expand Down
2 changes: 0 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5310,8 +5310,6 @@ cat >> conftest.c <<EOF
powerpc-linux-gnu
# elif defined(__s390x__)
s390x-linux-gnu
# elif defined(__s390__)
s390-linux-gnu
# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
sh4-linux-gnu
# elif defined(__sparc__) && defined(__arch64__)
Expand Down
2 changes: 0 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,6 @@ cat >> conftest.c <<EOF
powerpc-linux-gnu
# elif defined(__s390x__)
s390x-linux-gnu
# elif defined(__s390__)
s390-linux-gnu
# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
sh4-linux-gnu
# elif defined(__sparc__) && defined(__arch64__)
Expand Down