[CMake] How to specify -fpic ?
Marcel Loose
loose at astron.nl
Thu Sep 30 07:52:03 EDT 2010
On Thu, 2010-09-30 at 12:30 +0100, David Aldrich wrote:
> Hi Michael
>
> > So, the options are:
> >
> > - use -whole-archive as you do now
> > - make the Kernel library shared
> > - link the dlopen'ed libraries against Kernel
>
> Thanks very much - I understand. I think I will keep the
-whole-archive method.
>
> However, now I'm worried about how I link in the Python library:
>
> /usr/bin/c++ -O3 -DNDEBUG -Wall -m64 -o myProj -rdynamic
-Wl,-whole-archive Kernel/libKernel.a -Wl,-no-whole-archive -ldl
-lpython2.4
>
> The dlopen'ed libraries may use the Python library. I guess I could
include it in the -whole-archive part, but perhaps it would be better to
link each shared library against Python. Would you agree?
>
> Sorry that I am now off topic w.r.t cmake.
>
> By the way, I think I am pretty much there with changing our build
system from manually coded makefiles to cmake. I like cmake! Thanks for
all your help in getting there. The support on this list is excellent.
>
> Best regards
>
> David
>
Hi David,
Considering all the hassle you have to go through. Why don't you build a
shared libKernel.so library and let the runtime loader fix all the
issues you're now trying to solve compile/link time?
Best regards,
Marcel Loose.
More information about the CMake
mailing list