bug #28677: Cygwin's GCC no longer supports -mno-cygwin option

* configure.ac: For Win32 environments, add a check whether the
compiler understands the -mno-cygwin option.  If not, don't use
it but suggest using a different compiler.




git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@930 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2010-01-19 10:03:05 +00:00
parent befb4dc9cc
commit ca6ca5614a
3 changed files with 49 additions and 14 deletions

View File

@ -1,3 +1,10 @@
2010-01-19 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
bug #28677: Cygwin's GCC no longer supports -mno-cygwin option
* configure.ac: For Win32 environments, add a check whether the
compiler understands the -mno-cygwin option. If not, don't use
it but suggest using a different compiler.
2010-01-18 David Hoerl <dhoerl@mac.com>
bug #28660: Problem with loading intel hex rom files that exceed

10
NEWS
View File

@ -7,12 +7,14 @@ Approximate change log for AVRDUDE by version.
----------------------------------------------------------------------
Current:
* New devices supported:
* New programmers supported:
* Bugfixes
- bug #28660: Problem with loading intel hex rom files that exceed
0x10000 bytes
- see ChangeLog for more details
* New Features
- (JTAG ICE / AVR Dragon) apply external reset if JTAG ID could
not be read
Version 5.9:

View File

@ -241,16 +241,6 @@ else
fi
export confsubst
# See if we need to drop into the windows subdir.
case $target in
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
WINDOWS_DIRS="windows"
CFLAGS="${CFLAGS} -mno-cygwin -DWIN32NATIVE"
LDFLAGS="${LDFLAGS} -static"
;;
esac
AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
# If we are compiling with gcc, enable all warning and make warnings errors.
if test "$GCC" = yes; then
ENABLE_WARNINGS="-Wall"
@ -276,6 +266,42 @@ if test "$GCC" = yes; then
fi
AC_SUBST(ENABLE_WARNINGS,$ENABLE_WARNINGS)
# See if we need to drop into the windows subdir.
case $target in
*-*-mingw32* | *-*-cygwin* | *-*-windows*)
if test "$GCC" = yes -a \( "$CC" = "cc" -o "$CC" = "gcc" \); then
# does this compiler support -mno-cygwin?
AC_MSG_CHECKING([if $CC accepts -mno-cygwin])
safe_CFLAGS=$CFLAGS
CFLAGS="$ENABLE_WARNINGS -mno-cygwin"
AC_TRY_COMPILE(, [ int main () { return 0 ; } ], [
no_cygwin=yes
AC_MSG_RESULT([yes])
], [
no_cygwin=no
AC_MSG_RESULT([no])
])
CFLAGS=$safe_CFLAGS
if test x$no_cygwin = xyes; then
CFLAGS="${CFLAGS} -mno-cygwin"
else
AC_MSG_NOTICE([Your compiler does not understand the -mno-cygwin option.])
AC_MSG_NOTICE([You might want to select an alternative compiler, like])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([CC=mingw32-gcc ./configure])
AC_MSG_NOTICE([])
fi
fi
WINDOWS_DIRS="windows"
CFLAGS="${CFLAGS} -DWIN32NATIVE"
LDFLAGS="${LDFLAGS} -static"
;;
esac
AC_SUBST(WINDOWS_DIRS,$WINDOWS_DIRS)
AC_CONFIG_FILES([
doc/Makefile
windows/Makefile