commit:     eea3dcd064899b8250f90972208a5a7b623829e9
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 31 22:37:23 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Dec 31 22:48:16 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eea3dcd0

app-arch/zstd: disable asm (exec'able stack) on !amd64

See upstream bug / RH bug for details but the
property is silently lost and it's an error
in the annotation upstream.

Bug: https://bugs.gentoo.org/829849
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/zstd/{zstd-1.5.1.ebuild => zstd-1.5.1-r1.ebuild} | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/app-arch/zstd/zstd-1.5.1.ebuild 
b/app-arch/zstd/zstd-1.5.1-r1.ebuild
similarity index 85%
rename from app-arch/zstd/zstd-1.5.1.ebuild
rename to app-arch/zstd/zstd-1.5.1-r1.ebuild
index ee5d6e6b7871..4e3f4fdad650 100644
--- a/app-arch/zstd/zstd-1.5.1.ebuild
+++ b/app-arch/zstd/zstd-1.5.1-r1.ebuild
@@ -28,6 +28,16 @@ src_prepare() {
 }
 
 mymake() {
+       # We need to turn off asm for certain arches (!amd64) for now.
+       # - bug #829849
+       # - https://bugzilla.redhat.com/show_bug.cgi?id=2035802
+       # - https://github.com/facebook/zstd/issues/2963
+       local asm="ZSTD_NO_ASM=1"
+
+       if use amd64 ; then
+               asm=
+       fi
+
        emake \
                CC="$(tc-getCC)" \
                CXX="$(tc-getCXX)" \
@@ -35,6 +45,7 @@ mymake() {
                PREFIX="${EPREFIX}/usr" \
                LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
                V=1 \
+               ${asm} \
                "${@}"
 }
 

Reply via email to