This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: canonicalizing paths


DJ Delorie <dj@redhat.com> writes:

> > What's /bar/foo/../test?  It's /bar/test if you canonicalize the path,
> > and /test if you don't.
> > 
> > We need to be aware of this.  The question becomes, when do we care? 
> 
> In gcc's case, the ..'s are used to recreate an install tree based on
> where gcc (or its components) is found.  If gcc is in
> /foo/bar/bin/gcc, shouldn't it look for libraries in /foo/bar/lib even
> if /foo/bar/bin is a symlink?

Probably not.  A very common case is

/usr/local/bin/gcc -> /usr/local/gcc-2.95.3/bin/gcc

where every package is installed under /usr/local/<pkg>, with symlinks
to the most current version in /usr/local/bin and /usr/local/man and
so on.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]