This is the mail archive of the
mailing list for the GCC project.
Re: canonicalizing paths
DJ Delorie <firstname.lastname@example.org> 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
- Geoffrey Keating <email@example.com>