gcc-patches@gcc.gnu.org
[Top] [All Lists]

[PATCH] config.guess: Properly detect the *mingw32 targets

Subject: [PATCH] config.guess: Properly detect the *mingw32 targets
From: Rainer Emrich
Date: Wed, 11 Nov 2009 21:02:49 +0100
Here's a simple patch for config.guess to detect the different mingw32 targets.
If it is ok., somone with write permissions may commit.

Cheers,
Rainer
---
2009-11-11  Rainer Emrich  <rainer@xxxxxxxxxxxxxxxxxxx>

        * config.guess: Properly detect the *mingw32 targets

--- config.guess        (revision 154096)
+++ config.guess        (working copy)
@@ -798,7 +798,16 @@ EOF
        echo ${UNAME_MACHINE}-pc-cygwin
        exit ;;
     *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
+       eval $set_cc_for_build
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if [ `$CC_FOR_BUILD --version | head -c 3` == "gcc" ] ; then
+               echo `$CC_FOR_BUILD -dumpmachine`
+           else
+               echo ${UNAME_MACHINE}-pc-mingw32
+           fi
+       else
+           echo ${UNAME_MACHINE}-pc-mingw32
+       fi
        exit ;;
     i*:windows32*:*)
        # uname -m includes "-pc" on this system.

<Prev in Thread] Current Thread [Next in Thread>