Hello,

I have found a solution. There was no help on the CMake side, as I wrote some 
days ago, as you can only operate on the linking flags, but not append new 
libraries to the proccess.

So I went the linker route and found the "--whole-archive" option, that forces 
the linker to add all the object files of a library no matter if they are 
still not required. Then, the extra special definitions we have to pass CMake 
are:

-D 
CMAKE_SHARED_LINKER_FLAGS="-Wl,--whole-archive -lgcc -lgcc_s 
-Wl,--no-whole-archive"

and 

-D 
CMAKE_MODULE_LINKER_FLAGS="-Wl,--whole-archive -lgcc -lgcc_s 
-Wl,--no-whole-archive"

The first one will add those libraries in the OSG linking libraries phase and 
the second will do the same in the plugins linking phase. The -lgcc parameter 
goes before the -lgcc_s, as shown.

With this options, the compilation went fine until the end. Only several 
warnings of dh_shlibdeps about undefined symbols of the C standard library, 
triggered I suppose because we were linking to the whole gcc library with the 
whole-archive option.

I executed osgversion with success. osgconv failed because the 
intrinsic undefined symbols in a plugin, but that was only because I forgot 
to add the CMAKE_MODULE_LINKER_FLAGS, so the plugins didn't receive 
their "-lgcc -lgcc_s" at linking stage. Since every compilation of the 
package spends 30 hours, I'm not going to test it inmediately, but I'm pretty 
sure that my solution is valid.

Hope you find it useful,

Alberto



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to