|
Boost-Build : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-04-18 02:49:52
Rene Rivera wrote:
> Yes, that is the solution I was going to implement. Adding a flavor for
> cygwin is easy enough...
Rene, the current detecton code in gcc.jam faces a chiecken egg problem:
If you invoke g++ -dumpmachine you will get i686-pc-cygwin
and for g++ -dumpmachine -mno-cygwin you will get i686-pc-mingw32.
When invoking the native mingw compiler you get mingw32, and g++
simply ignores the -mno-cygwin switch.
So we are faced on windows with the following 2x2x2 3dim matrix:
1) Building from bash:
| windows | cygwin
------------------------------------
gcc-cygwin | -mno-cygwin | ok
gcc-mingw | ? | X
2) Building from cmd:
| windows | cygwin
------------------------------------
gcc-cygwin | -mno-cygwin | ?
gcc-mingw | ok | X
Where the column index is compiler and row index is target
platform. The ? indicate variants I was not able to verify
if this is possible at all. For X I believe this simply is not
possible (without serious tweaking of which dll's to load
and which include dirs to set up.)
Yet this is the situation on windows. Since gcc.jam is a single
file for all platforms, we would need to extend this matrix to
prevent surprise.
As I see it Mat ran exactly into case 2/1/2, building for
cygwin, using the gcc-cygwin from cmd.
Since this unavoidably interferes with the need for explicit <target-os>
specification, I am inclined to believe that we should try to treat the
problem in the context of cross platform builds.
> But auto-detecting may not be. Help on figuring
> out a way to tell that the particular g++ is a cygwin flavor is
> appreciated. (Especially since I don't have cygwin)
Rene I have set up on my machine the entire mix match of toolsets
i.e. mingw-native, cygwin, msvc, ... and I am currently trying
to figure out a way for reliably detecting the compiler.
Btw. just another issue springs to mind: I forgot a "shell": msys.
I'll post follow ups of my findings.
-- _________________________________________ _ _ | 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