Problem reported by a downstream Cygwin user inadvertently
misconfiguring a package cross-build with mingw toolchain:

libtool with mingw hangs building openocd in
func_convert_core_msys_to_w32:

        https://cygwin.com/pipermail/cygwin/2021-June/248791.html

The issue exists in libtool build-aux/ltmain.in line 963 in
func_convert_core_msys_to_w32 Windows subshell command:

        ( cmd //c echo "$1" )

see:

https://git.savannah.gnu.org/cgit/libtool.git/tree/build-aux/ltmain.in#n963

where the switch char "/" is duplicated, so instead of executing one
command in the Windows subshell context, a subshell is spawned and hangs
until manually exited e.g.:

$ cmd //c echo "$1"
Microsoft Windows [Version 10.0.19042.985]
(c) Microsoft Corporation. All rights reserved.

C:\...>exit
$

The patch merely removes the extraneous duplicated switch char "/".

As the patch is trivial, no copyright assignemnt should be required.

---
 build-aux/ltmain.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index 96b3700347d5..4b8088903740 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -960,7 +960,7 @@ func_convert_core_msys_to_w32 ()
   $debug_cmd
 
   # awkward: cmd appends spaces to result
-  func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
+  func_convert_core_msys_to_w32_result=`( cmd /c echo "$1" ) 2>/dev/null |
     $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
 }
 #end: func_convert_core_msys_to_w32

Reply via email to