This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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@emrich-ebersheim.de>

        * 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]