I'm currently porting one of my projects to GCC, and I'm using the MinGW-w64 project to accomplish this as I require both x64 and x86 support.
I've hit a problem in setting up my build environment though. My project currently uses the Boost C++ libraries, and to make the build process easier I use Boost.Build in my project too (as it makes integration simple).
Under MSVC this is fine, because I can do the following from the command line:
b2 toolset=msvc address-model=32 # compile as 32-bit
b2 toolset=msvc address-model=64 # compile as 64-bit
MinGW-w64 is making this 'problematic', as the 32-bit and 64-bit toolchains are housed in separate directories. (C:\MinGW32 and C:\MinGW64 respectively).
Is it possible to set up Boost.Build in a way that it will choose the correct toolchain based on the address-model flag? If not, what is my next best option?
EDIT:
If it helps, I am using the rubenvb 4.6.3-1 builds from the MinGW-w64 website in the "Personal Builds" folder (I am using these builds in particular as I wish to try getting my code to parse - but not compile - under Clang).
EDIT:
One solution I just thought of would be to 'manually' set the PATH to point to the correct toolchain before compilation, however this adds an extra layer of complication to my build process which I'd like to avoid. Ideally I would like it to be as easy as it is for MSVC, though I understand this may not be possible. In the worst case I assume what I just suggested would work, and I would just have to add scripts to correctly set the PATH before invoking Boost.Build. That would mean hardcoding a path though, which I don't want to do...