diff --git a/libs/ardour/wscript b/libs/ardour/wscript index fab18ccd4b..5f436d991f 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -481,10 +481,25 @@ def build(bld): obj.source += [ 'sse_functions_xmm.cc' ] obj.source += [ 'sse_functions_64bit_win.s', 'sse_avx_functions_64bit_win.s' ] avx_sources = [ 'sse_functions_avx.cc' ] - elif bld.env['build_target'] == 'armhf' or bld.env['build_target'] == 'aarch64': + elif bld.env['build_target'] == 'aarch64': obj.source += ['arm_neon_functions.cc'] obj.defines += [ 'ARM_NEON_SUPPORT' ] + elif bld.env['build_target'] == 'armhf': + # 32bit ARM needs -mfpu=neon + obj.defines += [ 'ARM_NEON_SUPPORT' ] + arm_neon_cxxflags = list(bld.env['CXXFLAGS']) + arm_neon_cxxflags.append (bld.env['compiler_flags_dict']['neon']) + bld(features = 'cxx cxxstlib asm', + source = ['arm_neon_functions.cc'], + cxxflags = arm_neon_cxxflags, + includes = [ '.' ], + definfes = obj.defines, + use = [ 'libpbd', 'libevoral'], + target = 'arm_neon_functions') + + obj.use += ['arm_neon_functions' ] + if avx_sources: # as long as we want to use AVX intrinsics in this file, # compile it with -mavx flag - append avx flag to the existing diff --git a/wscript b/wscript index 2a0fa899d3..ca0b2b9d42 100644 --- a/wscript +++ b/wscript @@ -86,6 +86,8 @@ compiler_flags_dictionaries= { 'attasm': '-masm=att', # Flags to make AVX instructions/intrinsics available 'avx': '-mavx', + # Flags to make ARM/NEON instructions/intrinsics available + 'neon': '-mfpu=neon', # Flags to generate position independent code, when needed to build a shared object 'pic': '-fPIC', # Flags required to compile C code with anonymous unions (only part of C11) @@ -120,6 +122,7 @@ compiler_flags_dictionaries= { 'c99': '/TP', 'attasm': '', 'avx': '', + 'neon': '', 'pic': '', 'c-anonymous-union': '', },