libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] [cygwin|mingw]: Add cross-compile support to cwrapper (take


From: Ralf Wildenhues
Subject: Re: [PATCH] [cygwin|mingw]: Add cross-compile support to cwrapper (take 6)
Date: Fri, 27 Aug 2010 20:28:11 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Charles Wilson wrote on Fri, Aug 27, 2010 at 08:17:15PM CEST:
> On 8/27/2010 2:10 PM, Ralf Wildenhues wrote:
> > Another questions regarding this patch:
> > 
> > Do you know whether all of the conversion functions are idempotent
> > (f(f(x)) = f(x))?  IOW, when the user passes names already converted,
> > do we do the right things in all cases?
> 
> I'm pretty sure they are *not*, especially the pathlist ones:

You mean the *path* ones.  Those that work on paths not on file names.
And there are (at least) two kinds of file names, absolute and relative
ones.  Please, let's fix the nomenclature to be the GCS one, once and
for all, ok?

> e.g. cygwin->win32
> /usr/bob:/fred:.  --> C:/cygwin/usr/bob;C:/cygwin/fred;.
> 
> Then, even if you ignore the fact that the 'fixup leading/trailing
> pathseps' code will be confused by ';' when it is expecting ':',
> 'cygpath.exe -m' is quite annoyed by win32 paths

Ah.  I see potential trouble coming that way then.  I mean, outside of
our nicely setup toy examples, with real packages, libtool cannot claim
to be the sole converter of file names or paths.  It would be even more
wrong than if the 'compile' script (which at least acts as a true
wrapper) claimed to do this.  User packages are going to have their own
converters sitting at various places.  We need to cope with that.

Now, iff all paths (as opposed to all file names) we convert are
generated from inside the libtool script only, then things might be
simplified a bit.

I don't think we should try to address this *yet*, but I will bet you
some good beer that we will receive bug reports to that end ...

> Is this important?  Peter takes care in his patches to only convert at
> the very last instant (so, it obviously only happens once).  The same is
> true in this patch itself.
> 
> What would seem important to me is that the conversion is reversible:
> 
> if g(x) = f^-1(x), then does g(f(x)) = x, for some value of "="?  (That
> is, do they refer to the same directory on the disk, even if they are
> spelled differently?)  This, I think, is true.  Spelling probably only
> varies in pathological cases (or when symlinks are involved, and the
> "other" filesystem doesn't support them).

Or /a//b or /a/b/../c or any other non-canonical form.  But yes,
reversibility is always good.  I don't know whether it is necessary
for libtool to work, though.

Cheers,
Ralf



reply via email to

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