Boost logo

Boost :

Subject: Re: [boost] First results using Comeau C/C++ compiler
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-11-25 01:04:59

Mateusz Loskot wrote:

> Hi,
> After quite some time of trying to build Boost, especially Boost.Test,
> using Comeau C/C++ frontend with GCC 4.x on Linux, I've started to get
> some promising results.
> During this investigation I was juggling number of fixes
> and patches [1] and eventually I found quite surprising solution.
> Yesterday, while reading signal.h and other headers to find out
> how to get signals features compiling for Boost.Test library,
> I came across an interesting macro which seems to be a passkey
> to the world of GNU C Library for Comeau toolset :-)
> It is _GNU_SOURCE macro [2]:
> "If you define this macro, everything is included: ISO C89, ISO C99,
> POSIX.1, POSIX.2, BSD, SVID, X/Open, LFS, and GNU extensions."
> Defining this macro seems to solve all issues I reported [1] so far.
> BTW, I've sent request to Comeau team for their opinion about usage of
> this macro with Comeau C/C++ frontend. Hopefully, it will be assumed
> safe to use, then we've got solution for all/most of the problems.
> Second due to the fact Comeau does not support linking as shared,
> I had to explicitly request to link Boost.Test binaries statically.
> I attach patch for Boost.Test Jamfile.v2 files adding the macro and
> configuring static link for como toolset.
> Let it be an example showing what kind of changes/options are needed by
> como toolset to build Boost.Test binaries.
> I haven't tried, but I suppose it's safe to assume that the same
> changes are needed to build other libraries like Asio, Program Options,
> and others. I'm going to find it out.
> To summary, there are two required changes in build configuration to
> enable como toolset, so far.
> So, what is the best approach to incorporate those two settings to other
> libraries (only those when it's needed):
> * Should I hack all Jamfiles where those changes are needed?
> * Or, it would make sense to set these options for como toolset,
> by default?
> * Where <link>static should go? To Jamfiles or nowhere and static
> linking should be explicitly enabled as bjam argument?
> I also tested: como --v2 link=satic

It seems to me that putting those requirements in Jamroot, as opposed
to individual Jamfiles, might be a best option. It does not seem like
those settings are specific to any library.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at