On Tue, Aug 11, 2020 at 08:01:55PM -0400, Paul Smith wrote:
> This is a kind of esoteric problem, but all the more annoying for that.

:-)

> As usual I've built my own version of GCC, and then I check it into Git
> so that all builds can use this one canonical compiler regardless of
> operating system, etc.

There's your problem.  Git is not an archiver.  Git does not track
directories at all, including empty directories.  Git is a "stupid
content tracker", and empty directories are contentless ;-)

> Of course, I can force the lib directory to exist by adding a dummy
> file there and I will do so.  However, it seems to me that it would be
> better if GCC would apply a simplifying function to pathnames to reduce
> all the "/.." elements, before it starts looking for directories, to
> avoid failing if some unnecessary element doesn't exist.  This
> shouldn't be too difficult since the path will be either the same
> length as, or shorter than, the original so there's no need to
> reallocate memory etc.: it can be updated in place.

It would be nice if this could be done (where possible -- see Jakub's
reply) before install already, so people looking at your install do not
have to look at ../../../../.. and remove five path components by hand.
There shouldn't be a problem doing it at file open time as you say
(unless we wand to support users putting .. in the paths themselves,
instead of just our make system doing that :-) )


Segher

Reply via email to