]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Enable various features in MinGW builds.
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 10 Apr 2016 13:40:39 +0000 (14:40 +0100)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Sun, 10 Apr 2016 14:27:16 +0000 (15:27 +0100)
I've reset the baseline to be the version of mingw-w64 that comes with
Ubuntu 14.04. Right now, that means no features need to be omitted; all
you need to do is set TOOLPATH to i686-w64-mingw32- .

I've removed -mno-cygwin without comment. Toolchains which don't support
this flag have been around since at least 2012, so we can probably
assume that no-one cares about older toolchains by now.

README
Recipe
mkfiles.pl

diff --git a/README b/README
index facdb7449e1e543e7cc5b8ab9c1ea70c890865df..43009fcc736f14afc0eed727053bf889d3094b1a 100644 (file)
--- a/README
+++ b/README
@@ -38,10 +38,13 @@ For building on Windows:
    `make -f Makefile.mgw' while in the `windows' subdirectory to
    build all the PuTTY binaries.
 
-   You'll probably need quite a recent version of the w32api package.
-   Note that by default the multiple monitor and HTML Help support are
-   excluded from the Cygwin build, since at the time of writing Cygwin
-   doesn't include the necessary headers.
+   MinGW and friends can lag behind other toolchains in their support
+   for the Windows API. Compile-time levers are provided to exclude
+   some features; the defaults are set appropriately for the
+   'mingw-w64' cross-compiler provided with Ubuntu 14.04. If you are
+   using an older toolchain, you may need to exclude more features;
+   alternatively, you may find that upgrading to a recent version of
+   the 'w32api' package helps.
 
  - windows/Makefile.lcc is for lcc-win32. Type `make -f
    Makefile.lcc' while in the `windows' subdirectory. (You will
diff --git a/Recipe b/Recipe
index f6de905e4c40cfdb929b012a62cf105a65db6803..f846c23b385cea33f50bb1b82f55337dc5330706 100644 (file)
--- a/Recipe
+++ b/Recipe
 #      full-screen mode (configurable to work on Alt-Enter) will
 #      not behave usefully in a multi-monitor environment.
 #
-#      Note that this definition is always enabled in the Cygwin
-#      build, since at the time of writing this <multimon.h> is
-#      known not to be available in Cygwin.
-#
 #  - COMPAT=/DNO_HTMLHELP (Windows only)
 #      Disables PuTTY's use of <htmlhelp.h>, which is not available
 #      with some development environments. The resulting binary
 #      will only look for an old-style WinHelp file (.HLP/.CNT), and
 #      will ignore any .CHM file.
 #
-#      Note that this definition is always enabled in the Cygwin
-#      build, since at the time of writing this <htmlhelp.h> is
-#      known not to be available in Cygwin (although you can use
-#      the htmlhelp.h supplied with HTML Help Workshop).
+#      If you don't have this header, you may be able to use the copy
+#      supplied with HTML Help Workshop.
 #
 #  - RCFL=/DNO_MANIFESTS (Windows only)
 #      Disables inclusion of XML application manifests in the PuTTY
 #
 #  - COMPAT=/DNO_SECUREZEROMEMORY (Windows only)
 #      Disables PuTTY's use of SecureZeroMemory(), which is missing
-#      from some environments' header files.  This is enabled by
-#      default in the Cygwin Makefile.
+#      from some environments' header files.
 #
 #  - XFLAGS=/DTELNET_DEFAULT
 #      Causes PuTTY to default to the Telnet protocol (in the absence
index 749cc23685f2866147db7d77fc26bfb1aacf5679..166ee1328e184d2253e4c110a3be004e5c1cef9d 100755 (executable)
@@ -455,6 +455,7 @@ if (defined $makefiles{'cygwin'}) {
     "# You can define this path to point at your tools if you need to\n".
     "# TOOLPATH = c:\\cygwin\\bin\\ # or similar, if you're running Windows\n".
     "# TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/\n".
+    "# TOOLPATH = i686-w64-mingw32-\n".
     "CC = \$(TOOLPATH)gcc\n".
     "RC = \$(TOOLPATH)windres\n".
     "# Uncomment the following two lines to compile under Winelib\n".
@@ -463,11 +464,11 @@ if (defined $makefiles{'cygwin'}) {
     "# You may also need to tell windres where to find include files:\n".
     "# RCINC = --include-dir c:\\cygwin\\include\\\n".
     "\n".
-    &splitline("CFLAGS = -mno-cygwin -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
-      " -D_NO_OLDNAMES -DNO_MULTIMON -DNO_HTMLHELP -DNO_SECUREZEROMEMORY " .
+    &splitline("CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT".
+      " -D_NO_OLDNAMES " .
               (join " ", map {"-I$dirpfx$_"} @srcdirs)) .
               "\n".
-    "LDFLAGS = -mno-cygwin -s\n".
+    "LDFLAGS = -s\n".
     &splitline("RCFLAGS = \$(RCINC) --define WIN32=1 --define _WIN32=1 ".
       "--define WINVER=0x0400 ".(join " ", map {"-I$dirpfx$_"} @srcdirs))."\n".
     "\n".