Skip to content
Snippets Groups Projects
Commit 3e3ee383 authored by chrfranke's avatar chrfranke
Browse files

Windows: Check support of gcc '-mno-cygwin' option in configure.

Update INSTALL instructions accordingly.


git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2925 4ea69e1a-61f1-4043-bf83-b5c94c648137
parent 79ea464b
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,10 @@ NOTES FOR FUTURE RELEASES: see TODO file.
<DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE>
[CF] Windows: Check support of gcc '-mno-cygwin' option in configure.
This option has been removed in Cygwin gcc 4.x. Update INSTALL
instructions accordingly.
[CF] Increase SCSI_TIMEOUT_DEFAULT from 6 to 20 seconds to avoid
timeouts when a disk spins up from standby mode.
......
......@@ -434,16 +434,32 @@ Same as Red Hat:
instead. This is not necessary for the generated ./configure script.
[10] Guidelines for Windows
==========================
===========================
To compile the Windows release with MinGW, use the following on Cygwin:
To compile the Windows release with MinGW gcc on MSYS, use:
./configure --build=mingw32
./configure
make
Instead of using "make install", copy the .exe files into
some directory in the PATH.
To compile with MinGW gcc 3.x on Cygwin, use:
./configure --build=i686-pc-mingw32
The above does not work if gcc 4.x is installed and selected as
default by /usr/sbin/alternatives. If the configure command aborts
with error message '... does not support -mno-cygwin', select
gcc 3.x by:
CC=gcc-3 CXX=g++-3 ./configure --build=i686-pc-mingw32
Alternatively, a MinGW-targeted cross-compiler can be used if available:
./configure --build=i686-pc-cygwin --host=i686-pc-mingw32
To build the Windows binary distribution, use:
make dist-win32
......
......@@ -34,8 +34,18 @@ AC_CANONICAL_HOST
dnl Set flags which may affect AC_CHECK_*.
case "${host}" in
*-*-mingw*)
# If building on Cygwin and not cross-compiling add '-mno-cygwin'
# to select MinGW gcc. This does no longer work for gcc 4.x.
if test "${build}" = "${host}" && test -x /usr/bin/uname && \
/usr/bin/uname | grep -i '^CYGWIN' >/dev/null; then
if $CC -v -mno-cygwin >/dev/null 2>&1 && \
$CXX -v -mno-cygwin >/dev/null 2>&1; then
CPPFLAGS="$CPPFLAGS -mno-cygwin"
LDFLAGS="$LDFLAGS -mno-cygwin"
else
AC_MSG_ERROR([$CC and $CXX do not support -mno-cygwin, see INSTALL file for details.])
fi
fi
CPPFLAGS="$CPPFLAGS -idirafter ${srcdir}/posix -idirafter ${srcdir}/os_win32"
;;
*-*-freebsd*)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment