CORE-2559 addresses building on s390x architecture, which is the 64-bit variant of s390. I am attaching a patch to enhance the support also to 32-bit s390.
The patch removes the -DS390X define from prefix.linux_s390x and replaces it with checks for __s390__ and __s390x__ defines which are presented by gcc. This way both ports can use one prefix file.
s390 has no alignment restrictions.