@@ -770,7 +770,11 @@ def build(bld):
770
770
'-Wl,-rpath=' + SYSROOT + '/lib64' ,
771
771
'-Wl,--dynamic-linker=' + SYSROOT + '/lib64/ld-2.31.so'
772
772
]
773
- bld .env .append_value ('LINKFLAGS' ,extra_cflags_root )
773
+ wl_end_group = [
774
+ '-Wl,--end-group'
775
+ ]
776
+
777
+ bld .env .append_value ('LINKFLAGS' ,extra_cflags_root + wl_end_group )
774
778
module_source = module_source + kernel_source
775
779
module_headers = module_headers + kernel_headers
776
780
uselib = ns3waf .modules_uselib (bld , ['core' , 'network' , 'internet' , 'netlink' ])
@@ -779,7 +783,7 @@ def build(bld):
779
783
headers = module_headers ,
780
784
use = uselib ,
781
785
includes = kernel_includes ,
782
- cxxflags = extra_cflags_root + ['-Wno-deprecated-declarations' ],
786
+ cxxflags = extra_cflags_root + ['-Wno-deprecated-declarations' ]+ wl_end_group ,
783
787
lib = ['dl' ])
784
788
# lib=['dl','efence'])
785
789
@@ -832,7 +836,7 @@ def build(bld):
832
836
# and forward to the dce_* code
833
837
bld .shlib (source = ['model/libc.cc' , 'model/libc-setup.cc' , 'model/libc-global-variables.cc' ],
834
838
target = 'lib/c-ns3' ,
835
- cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ],
839
+ cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ]+ wl_end_group ,
836
840
defines = ['LIBSETUP=libc_setup' ],
837
841
linkflags = ['-nostdlib' , '-fno-profile-arcs' ,
838
842
'-Wl,--version-script=' + os .path .join ('model' , 'libc.version' ),
@@ -841,7 +845,7 @@ def build(bld):
841
845
# and forward to the dce_* code
842
846
bld .shlib (source = ['model/libc.cc' , 'model/libc-setup.cc' ],
843
847
target = 'lib/pthread-ns3' ,
844
- cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ],
848
+ cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ]+ wl_end_group ,
845
849
defines = ['LIBSETUP=libpthread_setup' ],
846
850
linkflags = ['-nostdlib' , '-fno-profile-arcs' ,
847
851
'-Wl,--version-script=' + os .path .join ('model' , 'libpthread.version' ),
@@ -851,7 +855,7 @@ def build(bld):
851
855
# and forward to the dce_* code
852
856
bld .shlib (source = ['model/libc.cc' , 'model/libc-setup.cc' ],
853
857
target = 'lib/rt-ns3' ,
854
- cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ],
858
+ cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ]+ wl_end_group ,
855
859
defines = ['LIBSETUP=librt_setup' ],
856
860
linkflags = ['-nostdlib' , '-fno-profile-arcs' ,
857
861
'-Wl,--version-script=' + os .path .join ('model' , 'librt.version' ),
@@ -861,7 +865,7 @@ def build(bld):
861
865
# and forward to the dce_* code
862
866
bld .shlib (source = ['model/libc.cc' , 'model/libc-setup.cc' ],
863
867
target = 'lib/m-ns3' ,
864
- cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ],
868
+ cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ]+ wl_end_group ,
865
869
defines = ['LIBSETUP=libm_setup' ],
866
870
linkflags = ['-nostdlib' , '-fno-profile-arcs' ,
867
871
'-Wl,--version-script=' + os .path .join ('model' , 'libm.version' ),
@@ -871,7 +875,7 @@ def build(bld):
871
875
# and forward to the dce_* code
872
876
bld .shlib (source = ['model/libc.cc' , 'model/libc-setup.cc' ],
873
877
target = 'lib/dl-ns3' ,
874
- cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ],
878
+ cxxflags = extra_cflags_root + ['-g' , '-fno-profile-arcs' , '-fno-test-coverage' , '-Wno-builtin-declaration-mismatch' ]+ wl_end_group ,
875
879
defines = ['LIBSETUP=libdl_setup' ],
876
880
linkflags = ['-nostdlib' , '-fno-profile-arcs' ,
877
881
'-Wl,--version-script=' + os .path .join ('model' , 'libdl.version' ),
0 commit comments