mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
e7e6895802
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13174 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
27 lines
1003 B
Python
27 lines
1003 B
Python
#!/usr/bin/env python
|
|
import Options
|
|
import Utils
|
|
|
|
def configure(conf):
|
|
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('--accel-aes=intelaesni selected and non x86_64 CPU')
|
|
else:
|
|
raise Utils.WafError('--accel-aes=intelaesni selected and compiler rejects -Wp,-E,-lang-asm')
|
|
if not conf.CHECK_LDFLAGS('-Wl,-z,noexecstack'):
|
|
raise Utils.WafError('--accel-aes=intelaesni selected and linker rejects -z noexecstack')
|
|
|
|
def build(bld):
|
|
if not bld.CONFIG_SET('HAVE_AESNI_INTEL'):
|
|
return
|
|
|
|
bld.SAMBA_LIBRARY('aesni-intel',
|
|
source='aesni-intel_asm.c',
|
|
cflags='-Wp,-E,-lang-asm',
|
|
ldflags='-Wl,-z,noexecstack',
|
|
private_library=True)
|