[Scons-users] grouping mutually dependent libraries when using GNU	ld
    Eric Smith 
    eric at brouhaha.com
       
    Sun Aug 19 22:52:26 EDT 2012
    
    
  
I've seen several methods described on the wiki and other web pages for 
how to pass the grouping options to GNU ld to deal with mutually 
dependent libraries, but I had trouble with some and disliked others, so 
I came up with my own.  In case this might be useful to anyone else, 
here's an excerpt from my SConscript:
env.Append (LIBS = ['lib1', 'lib2', 'lib3'])
# need to have grouping of libraries with --start-group, --end-group
env ['_LIBFLAGS'] = '--start-group ' + env ['_LIBFLAGS'] + ' --end-group'
This results in ALL of the libraries being grouped, which is usually 
more general than actually necessary, but I never did figure out any 
reliable way to group only a specific subset of the libraries.
    
    
More information about the Scons-users
mailing list