remove use of hardcoded -fPIC compiler flag, and use compiler flag dict instead
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Oct 2018 02:06:11 +0000 (22:06 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 15 Oct 2018 02:06:11 +0000 (22:06 -0400)
24 files changed:
libs/audiographer/wscript
libs/backends/jack/wscript
libs/canvas/wscript
libs/evoral/wscript
libs/fluidsynth/wscript
libs/fst/wscript
libs/gtkmm2ext/wscript
libs/hidapi/wscript
libs/libltc/wscript
libs/lua/wscript
libs/midi++2/wscript
libs/pbd/wscript
libs/plugins/a-comp.lv2/wscript
libs/plugins/a-delay.lv2/wscript
libs/plugins/a-eq.lv2/wscript
libs/plugins/a-exp.lv2/wscript
libs/plugins/a-fluidsynth.lv2/wscript
libs/plugins/a-reverb.lv2/wscript
libs/qm-dsp/wscript
libs/surfaces/control_protocol/wscript
libs/temporal/wscript
libs/waveview/wscript
libs/widgets/wscript
libs/zita-resampler/wscript

index ad4140d25e93cf117de93bdee139e283558c0621..f6e7f7cd8391473ac009515ac28e74d5ef5c4fa5 100644 (file)
@@ -78,8 +78,8 @@ def build(bld):
         audiographer.defines      = [ 'LIBAUDIOGRAPHER_DLL_EXPORTS=1' ]
     else:
         audiographer              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=audiographer_sources)
-        audiographer.cxxflags     = [ '-fPIC' ]
-        audiographer.cflags       = [ '-fPIC' ]
+        audiographer.cxxflags     = [  bld.env['compiler_flags_dict']['pic'] ]
+        audiographer.cflags       = [ bld.env['compiler_flags_dict']['pic'] ]
         audiographer.defines      = []
 
     audiographer.name           = 'libaudiographer'
index 8de15ef74d93e9d384551021e931f9508ffb4337..bd5735f05a20ec085f12dfbd3c524cdd8354480f 100644 (file)
@@ -80,8 +80,8 @@ def build(bld):
     obj.use      = 'libardour libpbd ardouralsautil'
     obj.install_path  = os.path.join(bld.env['LIBDIR'], 'backends')
     if bld.env['build_target'] != 'mingw':
-        obj.cxxflags = [ '-fPIC' ]
-        obj.cflags   = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
     else:
         obj.cxxflags = [ ]
         obj.cflags   = [ ]
index 13742a8374b84e6e123ae9622098c19195cb2609..4458655bf898f8f3b203d5b89fc6943e2ef5acd9 100644 (file)
@@ -80,8 +80,8 @@ def build(bld):
         obj.defines      = [ 'LIBCANVAS_DLL_EXPORTS=1' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=canvas_sources)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags       = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index 0eb4b2cb4ce9442e47a53996d75fffcf035c1d06..5cc7957e316042ccb73910821c216e17b83bbf5c 100644 (file)
@@ -83,8 +83,8 @@ def build(bld):
     libsmf.use          = [ 'libtemporal' ]
     libsmf.install_path = None
     if bld.env['build_target'] != 'mingw':
-        libsmf.cxxflags     = [ '-fPIC' ]
-        libsmf.cflags       = [ '-fPIC' ]
+        libsmf.cxxflags     = [ bld.env['compiler_flags_dict']['pic'] ]
+        libsmf.cflags       = [ bld.env['compiler_flags_dict']['pic'] ]
 
     lib_source = '''
             src/Control.cpp
@@ -106,8 +106,8 @@ def build(bld):
         obj.defines      = [ 'LIBEVORAL_DLL_EXPORTS' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=lib_source)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags       = [ '-fPIC' ]
+        obj.cxxflags     = [ bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags       = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index 849c31f301f1b942f8bb9f8240c847b0035e61ed..ebce6efcb4b600c9e42fc75c0570564c7d714da5 100644 (file)
@@ -61,7 +61,7 @@ def build(bld):
         'src/fluid_settings.c',
         'src/fluid_sys.c'
         ],
-        cflags = [ '-fPIC', '-fvisibility=hidden' ],
+        cflags = [ bld.env['compiler_flags_dict']['pic'], '-fvisibility=hidden' ],
         includes = ['.', 'src/' ],
                target = 'libfluidsynth',
                use    = 'libfluidsynth_includes',
index ca90b7207d32c56fa609b8b39dc29d0d74ee6170..0bcd341980ccb74b4e5cfdfd4515bb7ffd3444c1 100644 (file)
@@ -66,7 +66,7 @@ def build(bld):
         obj.target = 'ardour-vst-scanner.exe.so'
         obj.uselib = ['GIOMM', 'DL']
         obj.use = [ 'libpbd' ]
-        obj.cxxflags  = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
     else:
         obj = bld (features = 'cxx c cxxprogram')
         obj.source = ( 'scanner.cc' )
index 8da17f58b0d88d30f3c3c52de88151b3efad2940..605596f951a41824bb493fd94e9a2d0010ac9e0b 100644 (file)
@@ -76,7 +76,7 @@ def build(bld):
         obj.defines      = [ 'LIBGTKMM2EXT_DLL_EXPORTS', 'ABSTRACT_UI_EXPORTS' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=sources)
-        obj.cxxflags     = [ '-fPIC' ]
+        obj.cxxflags     = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index 2c870661b8a8234251f43c0b11ae63f8e32d3792..383289fbece5d182c1aa442415e8e119a924d29f 100644 (file)
@@ -57,7 +57,7 @@ def build(bld):
         obj.linkflags      = [ '-lsetupapi', '-mwindows' ]
         obj.uselib         = 'SETUPAPI'
     else:
-        obj.cflags        += [ '-fPIC' ]
+        obj.cflags        += [ bld.env['compiler_flags_dict']['pic'] ]
         if sys.platform == 'darwin':
             obj.source     = 'mac/hid.c'
             obj.framework  = [ 'IOKit', 'CoreFoundation' ]
index 8cf7bb6389d9e2f32f54502410b5c6013b93c8fa..fde888c4262e2fd322bbc52958967a36f6b1720d 100644 (file)
@@ -43,7 +43,7 @@ def build(bld):
          )
 
     bld.stlib (source = ['ltc.c', 'timecode.c', 'encoder.c', 'decoder.c'],
-               cflags = [ '-fPIC' ],
+               cflags = [ bld.env['compiler_flags_dict']['pic'] ],
                includes = ['.'],
                target = 'libltc',
                use    = 'libltc_includes'
index b67820f3ccfc75f681a284f1a42ccd13034cd7db..3936e552e9604d98113f98956ac254ab83434e51 100644 (file)
@@ -22,12 +22,12 @@ def configure(conf):
 
 def build(bld):
     obj=bld.stlib (source = ['lua.cc', 'luastate.cc'],
-               cflags = [ '-fPIC' ],
-               cxxflags = [ '-fPIC' ],
-               includes = ['.'],
-               export_includes = ['.'],
-               target = 'liblua',
-               uselib = [ 'SIGCPP', 'DL' ]
+                   cflags = [ bld.env['compiler_flags_dict']['pic'] ],
+                   cxxflags = [ bld.env['compiler_flags_dict']['pic'] ],
+                   includes = ['.'],
+                   export_includes = ['.'],
+                   target = 'liblua',
+                   uselib = [ 'SIGCPP', 'DL' ]
                )
     autowaf.ensure_visible_symbols (obj, True)
 
index 19e0bbddacd4650fd1e069a5f47bbabab8b1ef52..54a8e0206503032fd03c92750896276ef14275f4 100644 (file)
@@ -61,7 +61,7 @@ def build(bld):
         obj.defines      = [ 'LIBMIDIPP_DLL_EXPORTS=1' ]
     else:
         obj              = bld.stlib(features = 'cxx cxxstlib', source=libmidi_sources)
-        obj.cxxflags     = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = []
 
     # everybody loves JACK
index cf4beba9fb2ecaef470700a4cd659ff87030d9b1..cedd3c13ba7cadbaf9ef9fa4efc44807f4474296 100644 (file)
@@ -151,8 +151,8 @@ def build(bld):
         obj.defines = [ 'LIBPBD_DLL_EXPORTS=1' ]
     else:
         obj              = bld.stlib(features = 'cxx cxxstlib', source=libpbd_sources)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags     = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = []
 
     if bld.is_defined('DEBUG_RT_ALLOC'):
index e450e919f01e9dd0ea31dd98ca05ebd54dd06850..fcfe1dca39a80735e83c9676e7dd6ae2574ed9ce 100644 (file)
@@ -39,7 +39,7 @@ def build(bld):
         obj = bld(features     = 'c cshlib',
                   source       = 'a-comp.c',
                   name         = 'a-comp',
-                  cflags       = [ '-fPIC',  bld.env['compiler_flags_dict']['c99'] ],
+                  cflags       = [ bld.env['compiler_flags_dict']['pic'],  bld.env['compiler_flags_dict']['c99'] ],
                   includes     = [ '../../ardour', '../shared' ],
                   target       = '../../LV2/%s/a-comp' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index 666ef0d5ab1f8bd7e61e82f9208d7dca6ae2737a..5ce87deac8158c65bd576d2dde47ee4b67777390 100644 (file)
@@ -39,7 +39,7 @@ def build(bld):
         obj = bld(features     = 'c cshlib',
                   source       = 'a-delay.c',
                   name         = 'a-delay',
-                  cflags       = [ '-fPIC',  bld.env['compiler_flags_dict']['c99'] ],
+                  cflags       = [ bld.env['compiler_flags_dict']['pic'],  bld.env['compiler_flags_dict']['c99'] ],
                   includes     = [ '../../ardour' ],
                   target       = '../../LV2/%s/a-delay' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index 0610ba2eeabfe6a61d8f71b2b2e320ea00501292..00edc9b1bc29fb0229fc4873bd3dc008cc939223 100644 (file)
@@ -39,7 +39,7 @@ def build(bld):
         obj = bld(features     = 'c cshlib',
                   source       = 'a-eq.c',
                   name         = 'a-eq',
-                  cflags       = [ '-fPIC',  bld.env['compiler_flags_dict']['c99'] ],
+                  cflags       = [ bld.env['compiler_flags_dict']['pic'],  bld.env['compiler_flags_dict']['c99'] ],
                   includes     = [ '../../ardour' ],
                   target       = '../../LV2/%s/a-eq' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index 27d24400864822844968ef1f896bc64865c49967..554bee0a6a13a825a8469f9fc782b02756d10bdd 100644 (file)
@@ -39,7 +39,7 @@ def build(bld):
         obj = bld(features     = 'c cshlib',
                   source       = 'a-exp.c',
                   name         = 'a-exp',
-                  cflags       = [ '-fPIC',  bld.env['compiler_flags_dict']['c99'] ],
+                  cflags       = [ bld.env['compiler_flags_dict']['pic'],  bld.env['compiler_flags_dict']['c99'] ],
                   includes     = [ '../../ardour', '../shared' ],
                   target       = '../../LV2/%s/a-exp' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index af6fcf08a89558d8b7c85419f530a391f0b8fc45..78d55eb89609329d4554a4e8c45ed193f5d5c400 100644 (file)
@@ -38,7 +38,7 @@ def build(bld):
         obj = bld(features     = 'cxx cshlib',
                   source       = 'a-fluidsynth.cc',
                   name         = 'a-fluidsynth',
-                  cxxflags     = [ '-fPIC' ],
+                  cxxflags     = [ bld.env['compiler_flags_dict']['pic'] ],
                   includes     = [ '../../ardour' ],
                   target       = '../../LV2/%s/a-fluidsynth' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index 35601f217918f18d9af21c1d511abeca633a8d7c..ac14a2c4e829e6e2ecf1d11b4b6c8c066bfa47de 100644 (file)
@@ -38,7 +38,7 @@ def build(bld):
         obj = bld(features     = 'c cshlib',
                   source       = 'a-reverb.c',
                   name         = 'a-reverb',
-                  cflags       = [ '-fPIC',  bld.env['compiler_flags_dict']['c99'] ],
+                  cflags       = [ bld.env['compiler_flags_dict']['pic'],  bld.env['compiler_flags_dict']['c99'] ],
                   includes     = [ '../../ardour' ],
                   target       = '../../LV2/%s/a-reverb' % bundle,
                   install_path = '${LV2DIR}/%s' % bundle,
index 92dc9502b17ffff4db002fcbf7bd53dfcd7d27a4..728d1fa94e5add54ade8a0ee36815850ffbeca1d 100644 (file)
@@ -79,8 +79,9 @@ def build(bld):
     obj.vnum         = QM_DSP_VERSION
     obj.install_path = bld.env['LIBDIR']
     if bld.env['build_target'] != 'mingw':
-        obj.cxxflags += [ '-fPIC' ]
-        obj.cflags   += [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
+
 
 def shutdown():
     autowaf.shutdown()
index 6a11cadb4adfeeb15ad89878efd44a7bf658a2ad..e56e4dc28bee28927937b3e146e6619d757594c2 100644 (file)
@@ -24,7 +24,7 @@ def build(bld):
         obj.defines      = [ 'LIBCONTROLCP_DLL_EXPORTS' ]
     else:
         obj              = bld.stlib(features = 'c cxx cstlib cxxstlib', source=controlcp_sources)
-        obj.cxxflags     = [ '-fPIC' ]
+        obj.cxxflags     = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.', './control_protocol' ]
index fc96d00b1b85c7b180f505ba1e73d59dce7d0964..84c638ab777be91ec650f38f7db0d4cb4133300e 100644 (file)
@@ -40,8 +40,8 @@ def build(bld):
         obj.defines      = [ 'LIBTEMPORAL_DLL_EXPORTS=1' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=temporal_sources)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags       = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index 35311fac17bc07d5f8a1da3e4836390c688b92be..a433b323a1d874e6506c6879eab05a91aef15e3c 100644 (file)
@@ -46,8 +46,8 @@ def build(bld):
         obj.defines      = [ 'LIBWAVEVIEW_DLL_EXPORTS=1' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=waveview_sources)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags       = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index 4a31086c1010d0fe7c25f1782617c26fb3bd6dcd..0ddd0148d96725586a9e2e6c598419b21cacc14f 100644 (file)
@@ -69,8 +69,8 @@ def build(bld):
         obj.defines      = [ 'LIBWIDGETS_DLL_EXPORTS=1' ]
     else:
         obj = bld.stlib(features = 'cxx cxxstlib', source=widgets_sources)
-        obj.cxxflags     = [ '-fPIC' ]
-        obj.cflags       = [ '-fPIC' ]
+        obj.cxxflags = [  bld.env['compiler_flags_dict']['pic'] ]
+        obj.cflags = [ bld.env['compiler_flags_dict']['pic'] ]
         obj.defines      = [ ]
 
     obj.export_includes = ['.']
index bdd4d333a1e7cea18cae854b12a5ac91b4aa6e70..03039d0d1d5bf93d8895dd39d81e8fb5327cdb5e 100644 (file)
@@ -42,7 +42,7 @@ def configure(conf):
 
 def build(bld):
     obj = bld.stlib(features = 'cxx cxxstlib', source = zresampler_sources)
-    obj.cxxflags        = [ '-fPIC', '-O3', '-ffast-math' ]
+    obj.cxxflags        = [ bld.env['compiler_flags_dict']['pic'], '-O3', '-ffast-math' ]
     obj.export_includes = ['.']
     obj.includes        = ['.']
     obj.name            = 'zita-resampler'