remove more explicit compiler flags by placing them in the compiler flags dictionary
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 14 May 2015 02:20:38 +0000 (22:20 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 29 Jun 2015 18:18:14 +0000 (14:18 -0400)
libs/backends/wavesaudio/wscript
wscript

index 130379181725c34732b57edf782322d796176deb..89fe65b7a015616809de37ebff1579ca59cc4f98 100644 (file)
@@ -88,10 +88,10 @@ def build(bld):
     obj.use      = 'libardour libpbd'
     if bld.env['build_target'] == 'mingw':
         obj.uselib   = ['PORTAUDIO']
-        obj.cxxflags = [ '-fPIC' ]
-        obj.cflags   = [ '-fPIC', '-fms-extensions' ]
+        obj.cxxflags = [ bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags   = [ bld.env['compiler_flags_dict']['pic'], bld.env['compiler_flags_dict']['c-anonymous-union'] ]
     else:
-        obj.cflags   = ['-fms-extensions' ]
+        obj.cflags   = [ bld.env['compiler_flags_dict']['c-anonymous-union'] ]
     obj.install_path  = os.path.join(bld.env['LIBDIR'], 'backends')
 
     if bld.env['build_target']== 'mingw':
diff --git a/wscript b/wscript
index 79f9209526b687d5f4f5b27a073b84db03861152..fcd217cf07f763f7363b4a2d706bcda1bd8efd5e 100644 (file)
--- a/wscript
+++ b/wscript
@@ -82,6 +82,8 @@ compiler_flags_dictionaries= {
         'avx': '-mavx',
         # 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)
+        'c-anonymous-union': '-fms-extensions',
     },
     'msvc' : {
         'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
@@ -112,6 +114,7 @@ compiler_flags_dictionaries= {
         'attasm': '',
         'avx': '',
         'pic': '',
+        'c-anonymous-union': '',
     },
 }