On Fri, 13 Jun 2003, Rob Siemborski wrote: > On Fri, 13 Jun 2003, Igor Brezac wrote: > > > > Anything that goes inside a lib should be -fPIC. Really. I have done this in > > > the Debian build (which runs OK in S/390, IA64, Alpha, MIPS, MIPS-EL...) > > > ages ago. I don't know if these changes are in CMU Cyrus. > > > > This in true only for shared libs unless you are trying to link an > > archive into a shared lib (which can be the case with perl modules). > > > > Position independent code adds some overhead. I think CMU folks like to > > build things static as much as possible for performance reasons. > > Actually, we prefer shared libraries for maintainability reasons.
I stand corrected. ;) All this trouble of building static libsasl led me to think this way. > However, the number of shared libraries our IMAPd links (once SASL is all > done loading etc) is something up near 25-30. Since each of these shared > libraries costs you a per-process jump table, this gets expensive in terms > of memory usage really fast. So, we try to link staticly in this case. > > > > Yep. Arch dislikes mixing PIC and non-PIC code inside a relocatable object. > > > > Correct. On Solaris, I build lib/ and perl/sieve/lib with -fPIC just to > > build cyrus-imap perl stuff. > > Hmmmm. We've never had to do this on solaris. > > I wonder if we could write a configure test to determine if this is > necessary on a given platform. It depends on how perl is built and possibly type of compiler/linker flags used. Also, CFLAGS=-fPIC breaks 'make depend'. I am not sure what is the best way to deal with this, fix makedepend?. -- Igor