diff --git a/smartmontools/CHANGELOG b/smartmontools/CHANGELOG index bf93c91fd99af6505717454581913246560a1ccd..5ded674f9984d83bdd907aea2bf8252de5b5d982 100644 --- a/smartmontools/CHANGELOG +++ b/smartmontools/CHANGELOG @@ -43,6 +43,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [CF] Windows: Use '.win64' in names of 64-bit binary packages. + Use correct 'strip' program when cross-compiling. + [CF] Add update script to make targets 'dist' and 'clean', set +x permission, update svn:ignore. diff --git a/smartmontools/INSTALL b/smartmontools/INSTALL index 136cf8a08d3749e6c4eebf8b841689448c1165a0..c03607b12e9e56b8c4313eaa1690cc0546383956 100644 --- a/smartmontools/INSTALL +++ b/smartmontools/INSTALL @@ -459,9 +459,7 @@ To cross-compile on Debian Linux with gcc-mingw32: To compile statically linked 64-bit version with MinGW-w64: ./configure --build=$(./config.guess) \ - --host=x86_64-pc-mingw32 \ - CC=x86_64-w64-mingw32-gcc \ - CXX=x86_64-w64-mingw32-g++ \ + --host=x86_64-w64-mingw32 \ LDFLAGS=-static Tested on Cygwin and Linux with MinGW-w64 from diff --git a/smartmontools/Makefile.am b/smartmontools/Makefile.am index 95fbaba36acf7617a16b9c83fcc473513a112d1a..40c71c68daa41b827b0b34e4226340661e6e777c 100644 --- a/smartmontools/Makefile.am +++ b/smartmontools/Makefile.am @@ -520,9 +520,15 @@ check: if OS_WIN32_MINGW # Definitions for Windows distribution -distdir_win32 = $(PACKAGE)-$(VERSION).win32 -distzip_win32 = $(PACKAGE)-$(VERSION).win32.zip -distinst_win32= $(PACKAGE)-$(VERSION).win32-setup.exe +if OS_WIN64 +win_bits = 64 +else +win_bits = 32 +endif + +distdir_win32 = $(PACKAGE)-$(VERSION).win$(win_bits) +distzip_win32 = $(PACKAGE)-$(VERSION).win$(win_bits).zip +distinst_win32 = $(PACKAGE)-$(VERSION).win$(win_bits)-setup.exe exedir_win32 = $(distdir_win32)/bin docdir_win32 = $(distdir_win32)/doc @@ -605,7 +611,7 @@ syslogevt.check: $(exedir_win32)/%.exe: %.exe cp -p $< $@ - strip -s $@ + if test -n '$(STRIP)'; then $(STRIP) -s $@; else strip -s $@; fi touch -r $< $@ $(docdir_win32)/%.html: %.html diff --git a/smartmontools/configure.in b/smartmontools/configure.in index 41876cad02d36366b6965b17d9f2891874c56761..29880c2156510acce8d4e30b211d0a4218d31103 100644 --- a/smartmontools/configure.in +++ b/smartmontools/configure.in @@ -38,7 +38,7 @@ case "${host}" in # 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 - AC_MSG_CHECKING([whether C and C++ compiler support -mno-cygwin]) + AC_MSG_CHECKING([whether $CC and $CXX support -mno-cygwin]) gcc_support_m_no_cygwin=no if $CC -v -mno-cygwin >/dev/null 2>&1 && \ $CXX -v -mno-cygwin >/dev/null 2>&1; then @@ -138,7 +138,7 @@ AC_MSG_RESULT([$libc_have_working_snprintf]) # check for __attribute__((packed)) AH_TEMPLATE(HAVE_ATTR_PACKED, [Define to 1 if C++ compiler supports __attribute__((packed))]) -AC_MSG_CHECKING([whether C++ compiler supports __attribute__((packed))]) +AC_MSG_CHECKING([whether $CXX supports __attribute__((packed))]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[struct a { int b; } __attribute__((packed));]])], [gcc_have_attr_packed=yes], [gcc_have_attr_packed=no]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [[#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) @@ -269,6 +269,7 @@ AC_SUBST(smartmontools_release_time) AC_MSG_CHECKING([for OS dependent modules and libraries]) dnl if OS not recognized, then use the os_generic modules +os_win64=no case "${host}" in *-*-linux*) AC_SUBST([os_deps], ['os_linux.o cciss.o']) @@ -302,7 +303,8 @@ case "${host}" in AC_SUBST([os_libs], ['']) ;; *-*-mingw*) AC_SUBST([os_deps], ['os_win32.o']) - AC_SUBST([os_libs], ['']) ;; + AC_SUBST([os_libs], ['']) + test "$host_cpu" = "x86_64" && os_win64=yes ;; *-*-darwin*) AC_SUBST([os_deps], ['os_darwin.o']) AC_SUBST([os_libs], ['-framework CoreFoundation -framework IOKit']) ;; @@ -345,6 +347,7 @@ dnl Define platform-specific symbol. AM_CONDITIONAL(OS_DARWIN, [echo $host_os | grep '^darwin' > /dev/null]) AM_CONDITIONAL(OS_SOLARIS, [echo $host_os | grep '^solaris' > /dev/null]) AM_CONDITIONAL(OS_WIN32_MINGW, [echo $host_os | grep '^mingw' > /dev/null]) +AM_CONDITIONAL(OS_WIN64, [test "$os_win64" = "yes"]) AM_CONDITIONAL(OS_FREEBSD, [echo $host_os | grep '^freebsd' > /dev/null]) dnl Add -Wall and -W if using g++ and its not already specified. @@ -364,7 +367,7 @@ if test "$GXX" = "yes"; then # Disable strict aliasing rules by default (see ticket #23). if test -z "`echo "$CXXFLAGS" | grep "\-f[[no-]]*strict-aliasing" 2> /dev/null`" ; then - AC_MSG_CHECKING([whether g++ supports -fno-strict-aliasing]) + AC_MSG_CHECKING([whether $CXX supports -fno-strict-aliasing]) ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="-fno-strict-aliasing" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],