more windows related SSE build fixes
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 21 Apr 2015 17:28:17 +0000 (13:28 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 21 Apr 2015 17:28:17 +0000 (13:28 -0400)
libs/ardour/wscript
wscript

index 208ec82b9179a71bd1a08a68f083a5bdfb757c16..918408c06d5cc1e7a2e5051df29128b6501ff74a 100644 (file)
@@ -412,7 +412,7 @@ def build(bld):
                # usability of the 64 bit windows assembler depends on the compiler target,
                # not the build host, which in turn can only be inferred from the name
                # of the compiler. 
-               if re.search ('/x86_64/', str(bld.env['CC'])):
+               if re.search ('/^x86_64/', str(bld.env['CC'])):
                        obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_64bit_win.s' ]
 
     # i18n
diff --git a/wscript b/wscript
index a352e2e7b98e754b8c884b00d623b541aefb9edd..f9716d99984fd67854b526807929758302e528bb 100644 (file)
--- a/wscript
+++ b/wscript
@@ -425,8 +425,14 @@ int main() { return 0; }''',
         if sys.platform == 'darwin':
             compiler_flags.append("-DBUILD_VECLIB_OPTIMIZATIONS");
             conf.env.append_value('LINKFLAGS_OSX', ['-framework', 'Accelerate'])
-        elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64' or (conf.env['build_target'] == 'mingw' and build_host_supports_sse):
-            compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
+        elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
+               compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
+        elif conf.env['build_target'] == 'mingw':
+               # usability of the 64 bit windows assembler depends on the compiler target,
+               # not the build host, which in turn can only be inferred from the name
+               # of the compiler. 
+               if re.search ('/^x86_64/', str(conf.env['CC'])):
+                       compiler_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
         if not build_host_supports_sse:
             print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")