small (very ) compilation speedup

Steve Langasek vorlon at netexpress.net
Fri Feb 22 17:43:20 GMT 2002


On Sat, Feb 23, 2002 at 12:33:05PM +1030, Richard Sharpe wrote:
> Actually, why don't we just create PIC objects when we can?

Instead of creating both PIC and non-PIC?  Some architectures, notably 
x86, fare significantly better with non-PIC code where possible.  Other 
architectures can't handle non-PIC code in shared libraries.  Short of 
creating a convoluted build sequence that uses the architecture type to 
decide what objects to build, the only other option is to build both.

I think running the preprocessor once per .c file sounds like a good 
idea.

Steve Langasek
postmodern programmer


> >not all of us have a fast machine ( I have a slow PII 350 ) so even a 
> >small speedup of compilation is welcome. Here my proposal.
> >
> >There are files in samba that are compiled two times, one time as standard 
> >obj, the second one as PIC code.
> >
> >What about to change the makefile to do the following steps:
> >
> >1. Compile with -E -oname.i to create a precompiled file
> >
> >2. compile this precompiled file as .o and .po
> >
> >The speedup while testing with reply.c is 5 %, but maybe it's worth the 
> >effort
> >
> >Bye
> >
> >Andreas
> >
> >
> 
> -- 
> Richard Sharpe, rsharpe at ns.aus.com, rsharpe at samba.org, sharpe at ethereal.com
> www.samba.org, www.ethereal.com, SAMS Teach Yourself Samba 
> in 24 Hours, Special Edition, Using Samba
> 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20020222/ef7ff1b3/attachment.bin


More information about the samba-technical mailing list