This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] config.guess: Properly detect the *mingw32 targets
Rainer Emrich wrote:
> I doubt if that's the right solution! As I see it, msys is primary a build
> system for windows. Which may be used by different windows targeted toolchains.
> These not only have different compilers, also different runtimes bundled. This
> in mint, it's much more natural and much easier to decide by invoking the compiler.
>
> This way you may have an arbitrary count of different toolchains with bundled
> runtimes which will just work! For switching between different toolchains you
> only have to modify your PATH!
I was just going by this, from around line 100 in config.guess:
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
Now..."discouraged" doesn't mean "disallowed", so I guess you could do
it your way. OTOH, config.guess can be used with packages that don't
require a compiler at all (python/ruby/perl extensions, shell script
packages, ...), and your method would break in that case. But I suppose
the odds of somebody trying to "build" a package on a win32ish platform
and NOT having any C compiler at all installed, yet still having a shell
interpreter in order to run config.guess at all, is pretty low.
I notice that most of the other mechanisms that use CC_FOR_BUILD use it
to either compile a small test program, or preprocess and parse the
output. They don't rely on gcc-specific command line flags like
-dumpmachine. But given that we're specifically talking about *MINGW*
here -- which is by definition "gcc for win32" and not "intelcc" or
"borlandcc" -- maybe that's ok too.
--
Chuck