Re: [pcre-dev] coff file info and data

Pàgina inicial
Delete this message
Autor: Philip Hazel
Data:  
A: Craig Silverstein
CC: pcre-dev
Assumpte: Re: [pcre-dev] coff file info and data
On Tue, 1 May 2007, Craig Silverstein wrote:

> What I've done in other projects is -g + strip. This ends up the same
> size as just omitting the -g, but this way, if you get a core file and
> need to look inside pcre, you can just recompile pcre with -g (and
> without strip), and all the addresses will still be right.


There doesn't seem to be a standard way of altering the default compiler
options that are set up by Autoconf. I have, therefore, done it "by
steam" in the configure.ac file. (If CFLAGS is not set on the command
line and it ends up as "-g -O2", reset it to just "-O2", or if it ends
up -g, reset it empty, and likewise for CXXFLAGS.)

This has a dramatic effect on the size of the compiled library. It also
adds a very small bit of performance:

             .a file     .so file     time to run RunTest


Without -g:  163,374     153,056       1.06
With    -g:  411,566     331,736       1.08


Those figures are on Linux; no doubt there's a similar effect on
Windows.

Philip

--
Philip Hazel, University of Cambridge Computing Service.