Thank you for the explanation. There is a bug in gcc.jam, since if I have a project-config.jam file with:
using gcc ;
using gcc : mingw : /opt/mxe/usr/bin/i686-pc-mingw32-g++ ;
and a Jamroot with:
exe hello : hello.cpp ;
and invoke with "b2 toolset=gcc-mingw", then I get both compilers added to CONFIG_COMMAND
"g++" "/opt/mxe/usr/bin/i686-pc-mingw32-g++" -o "bin/gcc-mingw-4.4.7/debug/hello" -Wl,--start-group -Wl,--start-group "bin/gcc-mingw-4.4.7/debug/hello.o" -Wl,-Bstatic -Wl,-Bstatic -Wl,-Bdynamic -Wl,-Bdynamic -Wl,--end-group -Wl,--end-group -g
It turns out that choosing "mingw" as my toolset version was not a fortunate choice since there is special treatment in gcc.jam that sets the flavor to mingw if the target machine has a mingw in it. Any other name works as expected.
Flavor is not used to find a toolset so toolset=gcc-mingw does not work no matter what is chosen as a version. Also flavor adds a tag at the end of the condition (<toolset>gcc-version-flavor) and produces a build at .../gcc-flavor-version/... so it is a little confusing.
---------------------------
As an aside, when I made my little test case above, I first put the using lines in the Jamroot and invoked with --ignore-config. The first thing that happened is that it found a project-config.jam from a directory far above my little test directory, so I added an empty project-config.jam. The next thing is that the using lines are ignored if they are in the Jamroot file. I am not sure why this happens, but I moved the using lines to the local project-config.jam.
Shouldn't using Jamroot, instead of Jamfile, make the current directory the root of the project so b2 should not look higher for a project-config.jam?
Shouldn't --ignore-config make it not look for a project-config.jam as well as site-config.jam and user-config.jam?
Is there any documentation on project-config.jam and what it normally contains?
Thanks,
Jess