From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-04-26 13:02:07
I refined my proposal.
Following Volodyas comment I changed the meaning of
the version subfeature to always mean the real version
of the compiler, i.e. the result of -dumpversion.
I mapped the value that is passed into toolset.using
to a subfeature called "identity". Given that there
currently is no condition present in boost tree that
has <toolset-gcc:version> this should be rather safe.
With my proposed changes the following will be possible:
In user-config.jam one could setup various compilers as
>From the commandline these variants can be invoked as usual:
will use the default compiler, and
will use the cross compiler.
It is also possible to invoke by
bjam toolset-gcc:version=4.1.0 toolset-gcc:flavor=powerpc_750_linux_gnu
But e.g. specifying a non existent version
bjam toolset-gcc:version=4.1.1 toolset-gcc:flavor=powerpc_750_linux_gnu
will result in error:
error: "4.1.1" is not a known subfeature value of <toolset>gcc
The more interesting part however is that now one can condition on
where flavor now only depends on the compiler executable and not on
user settings. (If the user has not overridden flavor)
I tried also to go some steps towards having the compiler selected
by feature values:
If we put into user-config.jam
it is possible to request the compiler by
bjam target-os=linux architecture=power instruction-set=750
However this has a shortcoming:
the default compiler compiler will be invoked, (with wrong arch)
which is not what the user will expect.
Also I think it is an interesting question if it would be possible
to find an automatic mapping from -dumpmachine to the triplet
architecture,host-os,instruction-set and set it in the init rule.
I attach my diff to gcc.jam to this mail.
In the hope my proposal is not too confusing I remain for opinions
on the matter.
-- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz_at_[hidden] ________| http://www.blackspace.at
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