libtool quoting error
Peter Rosin
peda@lysator.liu.se
Sun Aug 19 20:56:00 GMT 2012
[Cygwinners: Taking this to the Libtool lists]
[Libtoolers: Following up on a post on the cygwin mailing list]
On 2012-08-19 19:03, Andreas Schiffler wrote:
> The libtool distributed with cygwin has a bug that prevents use in paths containing spaces.
> This was encountered when trying to build SDL2 on Windows (see http://bugzilla.libsdl.org/show_bug.cgi?id=1575 for details or repro).
>
> # Which release of libtool.m4 was used?
> macro_version=2.2.6
> macro_revision=1.3012
>
> The fix is simple: add additional quoting.
>
> $ diff libtool libtool-fixed
> 2797c2797
> < exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
> ---
>> exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs'
> 8321c8321
> < if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
> ---
>> if test "X$ECHO" = "X$SHELL \"$progpath\" --fallback-echo"; then
> 8323,8324c8323,8324
> < [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
> < *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
> ---
>> [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL \"$progpath\" --fallback-echo";;
>> *) qecho="$SHELL `pwd`/\"$progpath\" --fallback-echo";;
> 8559c8559
> < relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
> ---
>> relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
The code changed in the two middle hunks went out after 2.2.6 and
are thus gone in 2.2.8 and later, so that no longer applies.
I also took the liberty of changing ltmain.m4sh instead of the
generated libtool script.
So, this is a better attempt for a patch, with Andreas added to
THANKS.
Ok to push?
Cheers,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libtool-quote-progpath-properly.patch
Type: text/x-patch
Size: 1832 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120819/777d0f8b/attachment.bin>
-------------- next part --------------
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list