1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00
Swen Schillig dfbfb7eb94 waf: Utils package not defined
Fix the package name for the WafError routine.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Tue Dec  4 18:45:38 CET 2018 on sn-devel-144
2018-12-04 18:45:38 +01:00

32 lines
1.2 KiB
Python

#!/usr/bin/env python
from waflib import Options
from waflib import Errors
def configure(conf):
if Options.options.accel_aes.lower() == "intelaesni":
asm_flags = ('-Wp,-E,-lang-asm', '-xassembler-with-cpp')
for f in asm_flags:
if conf.CHECK_CFLAGS(f, ''):
conf.DEFINE('AESNI_INTEL_CFLAGS', f)
break
if conf.CONFIG_SET('AESNI_INTEL_CFLAGS'):
if conf.env['SYSTEM_UNAME_MACHINE'] in ('x86_64', 'amd64'):
print("Compiling with Intel AES instructions")
conf.DEFINE('HAVE_AESNI_INTEL', 1)
else:
raise Errors.WafError('--accel-aes=intelaesni selected and non x86_64 CPU')
else:
raise Errors.WafError('--aes-accel=intelaesni selected and compiler rejects ' + str(asm_flags))
if not conf.CHECK_LDFLAGS('-Wl,-z,noexecstack'):
raise Errors.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=bld.CONFIG_GET('AESNI_INTEL_CFLAGS'),
ldflags='-Wl,-z,noexecstack',
private_library=True)