File ns3-3.17-overlinking.patch of Package ns3
Index: wscript
===================================================================
--- wscript.orig
+++ wscript
@@ -596,11 +596,6 @@ def create_ns3_program(bld, name, depend
else:
program.env.STLIB_MARKER = '-Wl,-Bstatic,--whole-archive'
program.env.SHLIB_MARKER = '-Wl,-Bdynamic,--no-whole-archive'
- else:
- if program.env.DEST_BINFMT == 'elf':
- # All ELF platforms are impacted but only the gcc compiler has a flag to fix it.
- if 'gcc' in (program.env.CXX_NAME, program.env.CC_NAME):
- program.env.append_value ('SHLIB_MARKER', '-Wl,--no-as-needed')
return program
Index: utils/wscript
===================================================================
--- utils/wscript.orig
+++ utils/wscript
@@ -7,6 +7,7 @@ def build(bld):
test_runner = bld.create_ns3_program('test-runner', ['core'])
test_runner.install_path = None # do not install
test_runner.source = 'test-runner.cc'
+ test_runner.linkflags = '-Wl,--no-as-needed'
# Set the libraries the testrunner depends on equal to the list of
# enabled modules plus the list of enabled module test libraries.