summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-12-31 18:44:19 +0100
committerMichał Górny <mgorny@gentoo.org>2019-12-31 18:44:19 +0100
commitb71890e7ec94187258bbd0de4553d8dd8d339efd (patch)
tree74857a998cbbcac7fcbac0d04b519393960e573c /app-crypt/argon2
parentnet-misc/freerdp: new snapshot (diff)
downloadgentoo-b71890e7ec94187258bbd0de4553d8dd8d339efd.tar.gz
gentoo-b71890e7ec94187258bbd0de4553d8dd8d339efd.tar.bz2
gentoo-b71890e7ec94187258bbd0de4553d8dd8d339efd.zip
app-crypt/argon2: Enable optimizations only if SSE2 is enabled
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-crypt/argon2')
-rw-r--r--app-crypt/argon2/argon2-20190702.ebuild11
1 files changed, 8 insertions, 3 deletions
diff --git a/app-crypt/argon2/argon2-20190702.ebuild b/app-crypt/argon2/argon2-20190702.ebuild
index 8681475dd803..dca7161761bf 100644
--- a/app-crypt/argon2/argon2-20190702.ebuild
+++ b/app-crypt/argon2/argon2-20190702.ebuild
@@ -31,10 +31,15 @@ src_prepare() {
tc-export CC
+ OPTTEST=1
if use amd64 || use x86; then
- OPTTEST=0
- else
- OPTTEST=1
+ $(tc-getCPP) ${CFLAGS} ${CPPFLAGS} -P - <<-EOF &>/dev/null && OPTTEST=0
+ #if defined(__SSE2__)
+ true
+ #else
+ #error false
+ #endif
+ EOF
fi
}