Commit f28523ff authored by Adrian Knoth's avatar Adrian Knoth
Browse files

[wscript] Fix FTBFS with -Wl,--as-needed

Patch by Adam Conrad <adconrad@canonical.com>, taken from Ubuntu's
jackd2 package.

Fixes linkage errors as described in

   http://permalink.gmane.org/gmane.comp.audio.jackit/25841
parent 50e793e7
......@@ -86,10 +86,9 @@ def build(bld):
#prog.env.append_value("LINKFLAGS", "-arch i386 -arch ppc -arch x86_64")
prog.env.append_value("LINKFLAGS", "")
if bld.env['IS_LINUX']:
prog.use += ['RT']
prog.env.append_value("LINKFLAGS", "-lm")
prog.use += ['RT', 'M']
if bld.env['IS_SUN']:
prog.env.append_value("LINKFLAGS", "-lm")
prog.use += ['M']
prog.target = example_program
......
......@@ -38,9 +38,9 @@ def build(bld):
jackd.use = ['serverlib']
if bld.env['IS_LINUX'] and bld.env['BUILD_JACKDBUS']:
jackd.source += ['../dbus/reserve.c', '../dbus/audio_reserve.c']
jackd.use += ['PTHREAD', 'DL', 'RT', 'DBUS-1']
jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++', 'DBUS-1']
else:
jackd.use += ['PTHREAD', 'DL', 'RT']
jackd.use += ['PTHREAD', 'DL', 'RT', 'M', 'STDC++']
jackd.target = 'jackd'
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
......
......@@ -183,6 +183,8 @@ def configure(conf):
conf.env['LIB_PTHREAD'] = ['pthread']
conf.env['LIB_DL'] = ['dl']
conf.env['LIB_RT'] = ['rt']
conf.env['LIB_M'] = ['m']
conf.env['LIB_STDC++'] = ['stdc++']
conf.env['JACK_API_VERSION'] = JACK_API_VERSION
conf.env['JACK_VERSION'] = VERSION
......@@ -235,8 +237,6 @@ def configure(conf):
if m != None:
svnrev = m.group(1)
conf.env.append_unique('LINKFLAGS', ['-lm', '-lstdc++'])
if Options.options.mixed == True:
env_variant2 = conf.env.copy()
conf.set_env_name('lib32', env_variant2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment