Subject: Re: [Boost-build] [boost] BOOST_CURRENT_FUNCTION [Boost Build updates]
From: Chris Knight (cknite_at_[hidden])
Date: 2008-09-06 20:53:15
On Friday 05 September 2008 4:36:30 pm Jurko GospodnetiÄ wrote:
> Hi Chris.
> > I gues this is as good as ever to mention a few major problems with
> > building boost using sun studio.
> >>From the CC man page:
> > The -fast macro expands into compilation options that
> > may affect other specified options. For example, in the
> > following command, the expansion of the -fast macro
> > includes -xtarget=native which reverts -xarch to one of
> > the 32-bit architecture options.
> > Incorrect:
> > example% CC -xarch=v9 -fast test.cc
> > Correct:
> > example% CC -fast -xarch=v9 test.cc
> > sun.jam apparently has no way of controlling the order in which
> > address-model, cxxflags, optimization and the various other options are
> > assembled into the final command. This results in garbage binaries.
> > My temporary solution was to remove all compiler options from sun.jam and
> > to simply pass in cxxflags in its entirety to bjam. This is obviously not
> > ideal.
> > A better solution would be to ensure the CC command that is generated is
> > in the order:
> > <threading> <stlport> <debug-symbols> <optimization> <address-model>
> > <cxxflags>
> > thereby allowing the user to pass in a cxxflags that provides the
> > apprpropriate xtarget and xarch flags and not worrying about later args
> > to the compiler undoing those settings via macros such as -fast.
> If this is so, then please modify the sun.jam toolset to construct
> the command line with parameters in a suitable order and post a patch to
> the Boost Build mailing list.
> That toolset module is the only one constructing the command line and
> has complete control over it so which ever ordering you need should be
> relatively easy to implement.
> If there are any problems - ask the questions on the Boost Build
> mailing list.
> Thank you.
> Best regards,
> Jurko GospodnetiÄ
Submitted for your approval, an updated sun.jam file that properly orders the
various macro command line arguments. Also adds <optimization> parameter
allowing user to supply -xtarget/-xarch/-xcache/-xchip arguments in the
proper location in the command line.
Also included is a small fix to exception/enable_current_exception.hpp to
compile under studio. This sun.jam file also apparently fixes the compilation
issues with 1.36 and libserialization. Tested w/ Studio 12 and Studio Express
Special care has been taken to not change any of the default build behavior
but rather to simply add the capability to supply your own optimization
parameter set. This is rather required for any aggressively optimized build
as -fast implies that all compilation units in the binary be built with
essentially the exact same set of optimization parameters. This allows users
with existing optimized build parameters to ensure boost is built using those
very same ones.
BTW, Is there a way to turn on stdlib=sun-stlport by default? It really makes
no sense to not set it as studio can not compile boost without it and it is
scheduled to become the default in the next release of studio anyway.
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