aspell-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?


From: Jose Da Silva
Subject: Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?
Date: Wed, 4 Jun 2008 00:22:54 -0700
User-agent: KMail/1.9.7

On June 3, 2008 11:35:47 pm Kevin Atkinson wrote:
> Sorry that last part should be "compiling or linking" (really should
> proof read better before sending).  By this I mean you will compile with
> CXX='-g' for debug mode and CXX='-O2' for release mode.

'-O2' is an optimization flag and has nothing to do with '-g'
The way the gcc compiler builds a program is sort of in this order.
-O1 (default if not specified) is basically a quick-n-dirty compile.
-O2 looks for possible optimizations to reduce code, for example if you 
have a function but it is only used once, the compiler will attempt to put 
the code in-line
-O3...O6 adds further optimizations and speed enhancements.
-OS is supposed to try and build small footprint code.

I don't know if it was/is done, but I think the linux kernel was built 
with -O6 which was a nonsensical optimization value at the moment (but 
worth keeping for future) since the gcc compiler doesn't really go much 
further than -O3 at the moment.
Most x86 code tends to get built with a preference for -O2 since it has a 
good tradeoff between compile speed and a reasonable code size when done.
I've seen a few example bugs in the aspell buglist in sourceforge with 
references for -O3 for sparc. I would probably expect tiny ARM machines 
would try for -OS if they could.

This DNDEBUG problem is really between -g and -DNDEBUG
so you meant CXX='-g -O2' for debug mode and CXX='-O2' for release mode.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]