[Scons-users] Cyclic references between lib archives

Ivan Kravets me at ikravets.com
Wed Feb 4 17:20:08 EST 2015


> On Feb 5, 2015, at 00:04, Dirk Bächle <tshortik at gmx.de> wrote:
> 
> On 04.02.2015 22:55, Ivan Kravets wrote:
>> 
>>> On Feb 4, 2015, at 23:26, Dirk Bächle <tshortik at gmx.de> wrote:
>>> 
>>> [...]
>>> 
>> I tried it early. It doesn't work because the order of options to gcc is incorrect. See example based on your link:
>>     deplibs = [.....]
>>     corelibs=["m"]
>>     env.(STATIC_LIBS=deplibs)
>> 
>>     env.Append(
>>         LINKFLAGS=[
>>             Split('-Wl,--start-group $STATIC_LIBS -Wl,--end-group')
>>         ],
>>     )
> 
> Sorry, but this is not really based on the given example...you're appending to LINKFLAGS, while the referenced solution appends to LINKCOM directly.
> Have you tried that as well?
> 
> Dirk
Hm... I don't like to change "core logic" in the 3-rd party tool, like SCons. I prefer to use "PUBLIC" access, without modifying "PRIVATE" field.
If I will modify "LINCOM" variable, then the only one working solution is add "cyclic" libs before _LIBFLAGS:
    src.Prepend(
        _LIBFLAGS="-Wl,--start-group $STATIC_LIBS -Wl,--end-group "
    ) 

This works good!

Tell me please, is it safe way? 


With best regards, Ivan Kravets
   - "Creativity comes from talent and never from knowledge" (c)
________________________
http://www.ikravets.com






More information about the Scons-users mailing list