diff --git a/ChangeLog b/ChangeLog index cc122de..4b2ef36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-19 Daniel Richard G. + + * config.guess (*:CYGWIN*:*): Consolidated the three Cygwin + cases, and added a check in case we're using one of the MinGW + compilers that Cygwin ships. + 2013-10-01 Ben Elliston Reported by Jö Fahlke . diff --git a/config.guess b/config.guess index b79252d..d867b79 100755 --- a/config.guess +++ b/config.guess @@ -817,8 +817,33 @@ EOF echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin + *:CYGWIN*:*) + case "${UNAME_MACHINE}" in + amd64 | x86_64) + cpu_vendor=x86_64-unknown ;; + p*) + cpu_vendor=powerpcle-unknown ;; + *) + cpu_vendor=${UNAME_MACHINE}-pc ;; + esac + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + # Cygwin ships the MinGW compilers, so check for those. + cat <<-EOF > $dummy.c + #if defined(__MINGW64__) + MINGW=64 + #elif defined(__MINGW32__) + MINGW=32 + #endif + EOF + MINGW= + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^MINGW'` + if [ -n "$MINGW" ]; then + echo ${cpu_vendor}-mingw$MINGW + exit + fi + fi + echo ${cpu_vendor}-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 @@ -863,12 +888,6 @@ EOF i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;;