commit:     2301daaf547f83a104767c0302f7e526be747ae5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May 16 22:13:40 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May 16 22:13:40 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2301daaf

app-crypt/rhash: don't automagically enable SHA

rhash-1.4.6 adds use of SHANI intrinsics and passes -msse4 -msha if that
isn't explicitly disabled at configure-time, which is problematic on
x86 at least.

While they actually do safe runtime checking AFAICT for use of their
*intriniscs*, building the rest of rhash with -msse4 definitely isn't
safe.

Reported-by: Christian Bricart <christian <AT> bricart.de>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-crypt/rhash/{rhash-1.4.6.ebuild => rhash-1.4.6-r1.ebuild} | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app-crypt/rhash/rhash-1.4.6.ebuild 
b/app-crypt/rhash/rhash-1.4.6-r1.ebuild
similarity index 95%
rename from app-crypt/rhash/rhash-1.4.6.ebuild
rename to app-crypt/rhash/rhash-1.4.6-r1.ebuild
index 8d1d887eaefc..00e9f557a341 100644
--- a/app-crypt/rhash/rhash-1.4.6.ebuild
+++ b/app-crypt/rhash/rhash-1.4.6-r1.ebuild
@@ -13,7 +13,7 @@ S="${WORKDIR}/RHash-${PV}"
 LICENSE="0BSD"
 SLOT="0/1"
 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 
~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos 
~x64-macos ~x64-solaris"
-IUSE="debug nls ssl static-libs"
+IUSE="cpu_flags_x86_sha debug nls ssl static-libs"
 
 RDEPEND="
        ssl? (
@@ -64,6 +64,7 @@ multilib_src_configure() {
                --disable-openssl-runtime \
                --disable-static \
                --enable-lib-shared \
+               $(usev !cpu_flags_x86_sha '--disable-shani') \
                $(use_enable debug) \
                $(use_enable nls gettext) \
                $(use_enable ssl openssl) \

Reply via email to