Boost logo

Boost-Build :

Subject: Re: [Boost-build] Choice of optimization flags for GCC
From: David Abrahams (dave_at_[hidden])
Date: 2008-09-14 04:47:06

on Tue Sep 09 2008, Vladimir Prus <> wrote:

> On Tuesday 09 September 2008 20:33:00 Brad Howes wrote:
>> On Sep 9, 2008, at 11:45 AM, David Abrahams wrote:
>> > Yes, but then we have another problem: the gcc documentation says that
>> > you should only use one -Ox option on the command-line, and we have no
>> > way to avoid producing command lines containing one of the values -O0
>> > -O3 or -Os.
>> From>
>> If you use multiple -O options, with or without level numbers,
>> the last such option is the one that is effective.
>> I assume it works since I rely on that to keep my release builds at -O2.
> Exactly. The last option takes predecence, and cxxflags are added to the end of
> the command line.

Okay, great. I don't know where I saw it, but I guess somewhere the GCC
docs contradict themselves.

Dave Abrahams
BoostPro Computing

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at