Boost logo

Boost-Build :

From: Rene Rivera (grafik666_at_[hidden])
Date: 2003-10-07 09:02:07


[2003-10-07] pfrants wrote:

>Hi,
>
>First of all: I am still using V1.
>
>I stumble upon a bug in one of the libstdc++ library header files,
>which involves inline assembler. The problem is that the code
>compiles (gcc) fine with optimization levels 1 to 3, but using level
>0 results in incorrect behaviour.
>
>I wrapped the call to these functions in one source file
>root/QBase/OS/InterlockedFunctions.cpp. My goal is to prevent bjam
>from using the -Oo flag on this source file. I could find no
>references to turning certain flags on or off for specific source
>files in the documentation or this yahooo group. How can I achieve my
>goal?

The short answer is, that per file options are not supported in BBv1. The
longer answer is that it can be done with some hackery in the toolset. It
involves adding a free feature to specify files to treat differently in the
target. And to "manually" set the flags when the file is compiled. Beman
asked for just such a thing last May for the como-win32 toolset. Take a look
at this thread: http://tinyurl.com/q0qh - And at the diffs that Beman did to
handle the <no-warn> feature: http://tinyurl.com/q0qw and
http://tinyurl.com/q0r4 - In your case you would have to "subtract" the
option from the CFLAGS variable on the target.

If you don't feel up to changing the toolset, another options is to put the
file(s) to be treated differently in a separate lib target and link that
into the regular target.

HTH.

-- grafik - Don't Assume Anything
-- rrivera (at) acm.org - grafik (at) redshift-software.com
-- 102708583 (at) icq

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk