Skip to content

Commit

Permalink
remove switch to shared libs for linking windows binaries
Browse files Browse the repository at this point in the history
This allows us to use static pthread with regular mingw builds

Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Jun 16, 2020
1 parent f5a6e4d commit 1c039d9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions common/wscript
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ def build(bld):
clientlib.env.append_value('LINKFLAGS', '-lnsl -lsocket')

if bld.env['IS_WINDOWS']:
# remove switch to shared binaries, as we most likely want static builds on Windows
clientlib.env['SHLIB_MARKER'] = ''
# statically link libjack to libstdc++, some client apps like ardour come
# with a different version of libstdc++.dll that takes precedence and results
# in missing symbols during runtime
Expand All @@ -221,9 +223,11 @@ def build(bld):
serverlib.target = 'jackserver'+libsuffix
serverlib.use = uselib
if bld.env['IS_WINDOWS']:
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
serverlib.env['implib_PATTERN'] = 'lib%s.dll.a'
serverlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
serverlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
serverlib.env['implib_PATTERN'] = 'lib%s.dll.a'
serverlib.env['SHLIB_MARKER'] = ''
serverlib.env.append_value('LINKFLAGS', ['-static-libstdc++', '--disable-auto-import'])
serverlib.install_path = '${LIBDIR}'
serverlib.source = [] + common_libsources
serverlib.source += [
Expand Down Expand Up @@ -323,6 +327,7 @@ def build(bld):
netlib.env['cxxshlib_PATTERN'] = 'lib%s.dll'
netlib.env['cxxstlib_PATTERN'] = 'lib%s.a'
netlib.env['implib_PATTERN'] = 'lib%s.dll.a'
netlib.env['SHLIB_MARKER'] = ''
netlib.use += ['WS2_32', 'WINMM']
elif not bld.env['IS_MACOSX']:
netlib.use += ['RT']
Expand Down

0 comments on commit 1c039d9

Please sign in to comment.