summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2017-09-06 11:59:44 -0700
committerJeremy Allison <jra@samba.org>2017-09-07 02:01:08 +0200
commit5f87a05aa314776135eec1057dd644c0b25a9d14 (patch)
treee1dff66d7aad99f2caefdd7b35e23210a1343c2a /third_party
parent53ac0f7c59a9192e4fa88bf3d257ad80379ded23 (diff)
downloadsamba-5f87a05aa314776135eec1057dd644c0b25a9d14.tar.gz
lib: crypto: Add the ability to select Intel AESNI instruction set at configure time.
Add --accel-aes=[none|intelaesni] to select. Default is none. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13008 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'third_party')
-rw-r--r--third_party/aesni-intel/wscript13
1 files changed, 11 insertions, 2 deletions
diff --git a/third_party/aesni-intel/wscript b/third_party/aesni-intel/wscript
index 002ba5d42d1..eb92d6626fe 100644
--- a/third_party/aesni-intel/wscript
+++ b/third_party/aesni-intel/wscript
@@ -1,8 +1,17 @@
#!/usr/bin/env python
+import Options
+import Utils
def configure(conf):
- if conf.CHECK_CFLAGS('-Wp,-E,-lang-asm', '') and conf.env['SYSTEM_UNAME_MACHINE'] == 'x86_64':
- conf.DEFINE('HAVE_AESNI_INTEL', 1)
+ if Options.options.accel_aes.lower() == "intelaesni":
+ if conf.CHECK_CFLAGS('-Wp,-E,-lang-asm', ''):
+ if conf.env['SYSTEM_UNAME_MACHINE'] == 'x86_64':
+ print("Compiling with Intel AES instructions")
+ conf.DEFINE('HAVE_AESNI_INTEL', 1)
+ else:
+ raise Utils.WafError('--aes-accel=intelaesni selected and non x86_64 CPU')
+ else:
+ raise Utils.WafError('--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm')
def build(bld):
if not bld.CONFIG_SET('HAVE_AESNI_INTEL'):