commit:     eab63f3cad9afcdb07334876409c5b52d7e07ee5
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Apr  3 12:17:40 2024 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Apr  3 12:20:42 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eab63f3c

dev-util/maturin: ensure -march is passed for s390x

Fails to build otherwise with:

src/arch/zseries_linux.s: Assembler messages:
src/arch/zseries_linux.s:49: Error: Unrecognized opcode: `lay'

If really needed, there'd be the alternate option to sed
/"s390x"/d from psm-*/build.rs, but passing -march is what
maturin upstream does as well for their s390x builds.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 dev-util/maturin/maturin-1.5.1-r1.ebuild | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dev-util/maturin/maturin-1.5.1-r1.ebuild 
b/dev-util/maturin/maturin-1.5.1-r1.ebuild
index 81f54669ac75..a692b2fa20a7 100644
--- a/dev-util/maturin/maturin-1.5.1-r1.ebuild
+++ b/dev-util/maturin/maturin-1.5.1-r1.ebuild
@@ -419,7 +419,7 @@ CRATES_TEST="
 "
 DISTUTILS_USE_PEP517=setuptools
 PYTHON_COMPAT=( pypy3 python3_{10..12} )
-inherit cargo distutils-r1 shell-completion toolchain-funcs
+inherit cargo distutils-r1 flag-o-matic shell-completion toolchain-funcs
 
 DESCRIPTION="Build and publish crates with pyo3, rust-cpython and cffi 
bindings"
 HOMEPAGE="https://www.maturin.rs/";
@@ -488,6 +488,10 @@ src_prepare() {
 src_configure() {
        export OPENSSL_NO_VENDOR=1
 
+       # https://github.com/rust-lang/stacker/issues/79
+       use s390 && ! is-flagq '-march=*' &&
+               append-cflags $(test-flags-CC -march=z10)
+
        local myfeatures=(
                # like release.yml + native-tls for better platform support 
than rustls
                full

Reply via email to