From 6485300479041f9d1e43750bad79b22e39aa56a5 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 13 May 2015 22:20:38 -0400 Subject: [PATCH] remove more explicit compiler flags by placing them in the compiler flags dictionary --- libs/backends/wavesaudio/wscript | 6 +++--- wscript | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libs/backends/wavesaudio/wscript b/libs/backends/wavesaudio/wscript index 1303791817..89fe65b7a0 100644 --- a/libs/backends/wavesaudio/wscript +++ b/libs/backends/wavesaudio/wscript @@ -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 79f9209526..fcd217cf07 100644 --- 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': '', }, }