summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2016-06-17 14:36:26 +0200
committerMichael Weber <xmw@gentoo.org>2016-06-17 14:36:51 +0200
commitfaf6a5dea44a39636633495e64450175b369e419 (patch)
tree19294011c31ba819ea5e5de0d59ba0180bb213a5 /dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch
parentsys-cluster/ceph: remove dependency on libedit. (diff)
downloadgentoo-faf6a5dea44a39636633495e64450175b369e419.tar.gz
gentoo-faf6a5dea44a39636633495e64450175b369e419.tar.bz2
gentoo-faf6a5dea44a39636633495e64450175b369e419.zip
dev-libs/libsodium: Add IUSE="cpu_flags_x86_sse4_1 cpu_flags_x86_aes"
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch')
-rw-r--r--dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch b/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch
new file mode 100644
index 000000000000..09e5c01618c5
--- /dev/null
+++ b/dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch
@@ -0,0 +1,40 @@
+--- libsodium-1.0.10/configure.ac
++++ libsodium-1.0.10/configure.ac
+@@ -344,6 +344,10 @@
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
+
++AC_ARG_ENABLE(sse4_1, [AS_HELP_STRING(--disable-sse4_1,Do not use sse4.1 code)],
++ AS_IF([test "x$enableval" = "xyes"], check_sse4_1="yes", check_sse4_1="no"),
++ check_sse4_1="yes")
++AS_IF([test "$check_sse4_1" = "yes"],[
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS="$CFLAGS -msse4.1"])
+ AC_MSG_CHECKING(for SSE4.1 instructions set)
+@@ -356,6 +360,7 @@
+ AX_CHECK_COMPILE_FLAG([-msse4.1], [CFLAGS_SSE41="-msse4.1"])],
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
++ ])
+
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-mavx], [CFLAGS="$CFLAGS -mavx"])
+@@ -393,6 +398,10 @@
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
+
++AC_ARG_ENABLE(aesni, [AS_HELP_STRING(--disable-aesni,Do not use aesni code)],
++ AS_IF([test "x$enableval" = "xyes"], check_aeni="yes", check_aesni="no"),
++ check_aesni="yes")
++AS_IF([test "$check_aesni" = "yes"],[
+ oldcflags="$CFLAGS"
+ AX_CHECK_COMPILE_FLAG([-maes], [CFLAGS="$CFLAGS -maes"])
+ AX_CHECK_COMPILE_FLAG([-mpclmul], [CFLAGS="$CFLAGS -mpclmul"])
+@@ -410,6 +419,7 @@
+ ],
+ [AC_MSG_RESULT(no)])
+ CFLAGS="$oldcflags"
++ ])
+
+ ])
+