Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9704: b2: Compiler flavour has no flexibility for cross-compiling projects.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-04 22:13:25
#9704: b2: Compiler flavour has no flexibility for cross-compiling projects.
--------------------------------+--------------------------------
Reporter: lukasz.forynski@⦠| Owner: steven_watanabe
Type: Bugs | Status: assigned
Milestone: To Be Determined | Component: build
Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords: boost build system
--------------------------------+--------------------------------
Comment (by steven_watanabe):
Replying to [ticket:9704 lukasz.forynski@â¦]:
> Problems:
> 1. Different toolset names when building on different OSes (and yes, I
did try to specify a default flavor, but see Problem 2).
>
>
> || || command || toolset
|| flavor ||
> || gcc XA32(linux) || b2 || gcc
|| 4.7 ||
> || gcc XA32(win) || b2 ||
gcc-4.7.2-mingw || ? ||
> || '''gcc armhf(linux)''' || '''b2 --toolset=gcc-armhf''' ||
'''gcc''' || '''armhf''' ||
> || gcc armhf(win) || b2 --toolset=gcc-armhf target-os=linux || gcc-
mingw-armhf || ? ||
>
> Only gcc-armhf seems to achieve requested results. BUt the main issue
it, that it is all different on different platforms, and both: armhf
should produce compatible binaries.
I'm sorry. I don't understand this table. On line 1, gcc XA32(linux),
the properties should be <toolset>gcc <toolset-gcc:version>4.7.2 On line
2, gcc XA32(win), they should be <toolset>gcc <toolset-gcc:version>4.7.2
<toolset-gcc:flavor>mingw. For lines 3-4, just replace 4.7.2 with armhf.
I suppose my issue is that I don't see how you're deciding what is the
toolset and what is the flavor.
I've been trying several things and the only issue that I ran into using
multiple versions of gcc (including a cross-compiler) is the old problem
when mixing MinGW with other versions of gcc (All versions of gcc are
tagged as mingw).
Here's what I suggest. It seems to work for me with a combination of
mingw-w64 and native gcc on linux.
{{{
using gcc : 4.7.2 : g++ : <flavor>host ;
using gcc : 4.8.0 : /usr/local/gcc-4.8.0/bin/g++ : <flavor>host ;
using gcc : 4.7.2 : i686-w64-mingw32-g++ : <flavor>mingw ;
}}}
Then you can access <toolset-gcc:flavor> to get the flavor.
(Adjust the version number, path, and flavor for your
environment. If you leave the version blank, it will be
auto-deduced.)
Running
{{{
# Uses g++
b2
b2 gcc
b2 gcc-4.7.2
b2 gcc-linux
b2 gcc-linux-4.7.2
b2 gcc-4.7.2-linux
# Uses GCC 4.8
b2 gcc-4.8.0
b2 gcc-4.8.0-linux
# Uses MinGW g++
b2 gcc-4.7.2-mingw
b2 gcc-mingw
}}}
You have to be a little careful, since Boost.Build is not smart about
filling in defaults. It's safest to specify just gcc, which will always
take the first version initialized, or to specify the full gcc-version-
flavor. (b2 gcc-mingw will break if you put gcc 4.8.0 first, since it
becomes gcc-4.8.0-mingw, which doesn't exist.)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/9704#comment:3> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:15 UTC