build: add flag for inline assembly

This is used to disable inline assembly (useful for old version of binutils
like the one in OpenBSD).
This commit is contained in:
Stefano Pigozzi 2013-12-29 17:34:31 +01:00
parent 392856ed4d
commit f06a870b88
2 changed files with 10 additions and 5 deletions

View File

@ -19,10 +19,10 @@ def configure(ctx):
ctx.define('ARCH_X86_64', 0)
ctx.define('HAVE_FAST_64BIT', 0)
ctx.define('HAVE_MMX', 'ARCH_X86', quote=False)
ctx.define('HAVE_MMX2', 'ARCH_X86', quote=False)
ctx.define('HAVE_SSE', 'ARCH_X86', quote=False)
ctx.define('HAVE_SSE2', 'ARCH_X86', quote=False)
ctx.define('HAVE_SSSE3', 'ARCH_X86', quote=False)
ctx.define('HAVE_MMX', 'HAVE_ASM && ARCH_X86', quote=False)
ctx.define('HAVE_MMX2', 'HAVE_ASM && ARCH_X86', quote=False)
ctx.define('HAVE_SSE', 'HAVE_ASM && ARCH_X86', quote=False)
ctx.define('HAVE_SSE2', 'HAVE_ASM && ARCH_X86', quote=False)
ctx.define('HAVE_SSSE3', 'HAVE_ASM && ARCH_X86', quote=False)
globals().get(ctx.env.DEST_CPU, default)(ctx)

View File

@ -59,6 +59,11 @@ build_options = [
'desc': 'w32 executable',
'deps_any': [ 'os-win32', 'os-cygwin'],
'func': check_ctx_vars('WINDRES')
}, {
'name': '--asm',
'desc': 'inline assembly',
'default': 'enable',
'func': check_true,
}
]