]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0964: MS-Windows: sed error with MinGW v9.1.0964
authorAndrey A. Voropaev <voropaev.andrey@swm.de>
Thu, 26 Dec 2024 14:55:24 +0000 (15:55 +0100)
committerChristian Brabandt <cb@256bit.org>
Thu, 26 Dec 2024 14:59:06 +0000 (15:59 +0100)
Problem:  MS-Windows: sed error with MinGW
Solution: use double quotes for sed, update compilation notes
          (Andrey A Voropaev)

closes: #16304

Signed-off-by: Andrey A. Voropaev <voropaev.andrey@swm.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/INSTALLpc.txt
src/Make_cyg_ming.mak
src/version.c

index 9c52e9f46e432028a9be2f5b990e0010a41fa8a1..5854b10c5a636855a6de0f2cf2de538d057af1a8 100644 (file)
@@ -1,4 +1,4 @@
-INSTALLpc.txt - Installation of Vim on PC
+INSTALLpc.txt - Installation of Vim on PC - Last Update: 2024 Dec 26
 
 This file contains instructions for compiling Vim. If you already have an
 executable version of Vim, you don't need this.
@@ -256,6 +256,8 @@ Select one of the following icon from the Start Menu:
 * MSYS2 MinGW 32-bit (To build 32-bit versions of Vim)
 * MSYS2 MinGW 64-bit (To build 64-bit versions of Vim)
 
+Before building look through notes for MinGW in part 3 below.
+
 Go to the source directory of Vim, then execute the make command.  E.g.:
 
     make -f Make_ming.mak
@@ -320,6 +322,18 @@ The original 'mingw32' compiler is outdated, and may no longer work:
 
     http://www.mingw.org/
 
+Please note, newer versions of Windows (I believe starting with Win10)
+offer support for UCRT C-library in addition to traditional MSVCRT. As result,
+one may find 2 flavors of MinGW: one compiling against UCRT and another compiling
+against MSVCRT. Currently VIM comes with libXpm.a compiled against MSVCRT,
+so an attempt to build VIM against UCRT will fail with:
+
+    undefined reference to __imp___iob_func
+
+In which case, if one does not need support for XPM, then argument XPM=no can be
+added to make-command. If support is needed, then another flavor of MinGW must
+be used.
+
 Once you have downloaded the compiler binaries, unpack them on your hard disk
 somewhere, and put them on your PATH.  Go to the Control Panel, (Performance
 and Maintenance), System, Advanced, and edit the environment from there.  If
@@ -349,11 +363,18 @@ Change directory to 'vim\src':
 
 and you type:
 
-    mingw32-make -f Make_ming.mak gvim.exe
+    mingw32-make -f Make_ming.mak ARCH=x86-64 gvim.exe
+
+Note, ARCH is necessary if you don't have the sed command in your $PATH. Just
+make sure that the correct value is used with ARCH. In the example above the
+value corresponds to 64-bit architecture. For 32-bit the value is x86.
 
 After churning for a while, you will end up with 'gvim.exe' in the 'vim\src'
 directory.
 
+If you also want to get xxd.exe, install.exe etc. then just remove "gvim.exe"
+from the make-command.
+
 You should not need to do *any* editing of any files to get vim compiled this
 way.  If, for some reason, you want the console-mode-only version of vim (this
 is NOT recommended on Win32, especially on '95/'98!!!), you can use:
@@ -671,12 +692,12 @@ When building, you need to set the following variables:
 E.g. When using MSVC (as one line):
 
     nmake -f Make_mvc.mak
-        PERL=C:\Perl DYNAMIC_PERL=yes PERL_VER=522
+        PERL=C:\StrawberryPerl\perl DYNAMIC_PERL=yes PERL_VER=522
 
 Or when using MinGW (as one line):
 
     mingw32-make -f Make_ming.mak
-        PERL=C:/Perl DYNAMIC_PERL=yes PERL_VER=522
+        PERL=C:/StrawberryPerl/perl DYNAMIC_PERL=yes PERL_VER=522
 
 
 11. Building with Ruby support
index 8aeba67cd9342145ce5fc09c3c14462dca61e1d8..cd84b85a5a0e3ca7be565d5fe6a3759691921892 100644 (file)
@@ -239,7 +239,7 @@ endif
 
 # Get the default ARCH.
 ifndef ARCH
-ARCH := $(shell $(CC) -dumpmachine | sed -e 's/-.*//' -e 's/_/-/' -e 's/^mingw32$$/i686/')
+ARCH := $(shell $(CC) -dumpmachine | sed -e "s/-.*//" -e "s/_/-/" -e "s/^mingw32$$/i686/")
 endif
 
 
index 3a049140c503b2ab790a7242af49be093827095f..e1e0e36bc33e1c995c47f3e30e296a63dd93c3fc 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    964,
 /**/
     963,
 /**/