libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool quoting error


From: Peter Rosin
Subject: Re: libtool quoting error
Date: Sun, 19 Aug 2012 22:09:36 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0

[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

Attachment: 0001-libtool-quote-progpath-properly.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]