[CMake] How to specify -fpic ?
Marcel Loose
loose at astron.nl
Thu Sep 30 05:24:46 EDT 2010
On Thu, 2010-09-30 at 10:15 +0100, David Aldrich wrote:
> Hi Michael
>
> Thanks for your reply.
>
> > The only difference between -fpic and -fPIC is that the latter has
no limit
> > on the size of the global offsets table and this is only relevant
for the
> > m68k, PowerPC and SPARC architectures (according to the GCC manual
page).
>
> Yes, we aren't using those architectures.
>
> > Are you using -fvisibility=hidden somewhere?
>
> No.
>
> > Is this option the only difference of the link commands?
>
> Actually, the shared library linker commands are similar but the
executable linker commands are quite different.
>
> CMake:
>
> /usr/bin/c++ -O3 -DNDEBUG -Wall -m64 -o myProj -rdynamic
Kernel/libKernel.a -lpython2.4
>
> Manual make:
>
> g++ -o myProj -ldl -Wl,-whole-archive,-export-dynamic
../Kernel/libKernel.a -lboost_python-mt -lpython2.4
-Wl,--no-whole-archive
>
> I will have to analyse these flags. Any thoughts on the use of
-whole-archive/--no-whole-archive here please?
>
> BR
>
> David
See this yesterday's mail:
http://www.mail-archive.com/cmake@cmake.org/msg31781.html
HTH,
Marcel Loose.
More information about the CMake
mailing list