]> granicus.if.org Git - vim/commitdiff
patch 8.1.0419: Cygwin: running cproto fails with -O2 v8.1.0419
authorBram Moolenaar <Bram@vim.org>
Fri, 21 Sep 2018 11:56:25 +0000 (13:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 21 Sep 2018 11:56:25 +0000 (13:56 +0200)
Problem:    Cygwin: running cproto fails with -O2.
Solution:   Strip -O2 for cproto. (Ken Takata, closes #3465)

src/Makefile
src/version.c

index 9c19281d805d64d020095451dfec2b3c25672f8c..5b25e033fa3650afbfb02b7decbeef3bc007bdd6 100644 (file)
@@ -2028,8 +2028,9 @@ proto: $(PRO_AUTO) $(PRO_MANUAL)
 # them as a list of individual flags.
 # The -E"gcc -E" argument must be separate to avoid problems with shell
 # quoting.
+# Strip -O2, it may cause cproto to write stderr to the file "2".
 CPROTO = cproto $(PROTO_FLAGS) -DPROTO \
-        `echo '$(LINT_CFLAGS)' | sed -e 's/ -[a-z-]\+//g'`
+        `echo '$(LINT_CFLAGS)' | sed -e 's/ -[a-z-]\+//g' -e 's/ -O[^ ]\+//g'`
 
 ### Would be nice if this would work for "normal" make.
 ### Currently it only works for (Free)BSD make.
index 079657effbca7ff2d9c356bb6f5b49fcace510ad..bc3cbf3f88726608cee91de2919f03e0ecfb1ce3 100644 (file)
@@ -794,6 +794,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    419,
 /**/
     418,
 /**/