From: john s. <sk...@us...> - 2009-11-28 01:29:28
|
On 28/11/2009, at 6:51 AM, Olivier Gillet wrote: > After poking around, I've created an archive with all the object files > compiled with -fPIC that are created when building from source: > > ar cru JudyPic.a ../JudyCommon/.libs/JudyMalloc.o > ../JudyL/.libs/JudyLCascade.o ... > ranlib JudyPic.a > (those are normally bundled together for the dynamic library) > > And linked against the resulting .a. It works on 64bits! A simpler > solution would be welcome, though I realize my use case (dynamic but > with all dependencies pre-linked) is rather exotic. Felix makes both static and dynamic judy libraries. Use of -fpic by default is a BAD idea because in 64 bit intel chips on most platforms this forces generation of a nasty linkage code which clutters up the CPU, wastes instructions, and trashes registers, and also requires a global thunk table. This is a design bug in the OS's of course. This doesn't happen with 32 bit intel code. We wrote our own code for building Judy in Python and had to mess about with the way the 32 and 64 bit control tables are used. The Judy build script is a bit of a mess. However with the right fiddling static and dynamic linking works on Unix 32, Unix 64, Windows 32, and Windows 64 bit OS/compilers (the code itself is properly parameterised even if some contortions are required to drive the build to get the right parameters). -- john skaller sk...@us... |