[Top][All Lists]
[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.
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, (continued)
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Jose Da Silva, 2008/06/01
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/01
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Jose Da Silva, 2008/06/01
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/01
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Jose Da Silva, 2008/06/04
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/01
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, syntheticpp, 2008/06/03
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Jose Da Silva, 2008/06/03
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/03
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/04
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?,
Jose Da Silva <=
- Re: [aspell-devel] Does Anyone Compile Aspell with -DNDEBUG?, Kevin Atkinson, 2008/06/04