This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Making gcc -no-canonical-prefixes the default?
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Simon Baldwin <simonb at google dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 28 Jan 2011 22:34:29 +0000 (UTC)
- Subject: Re: Making gcc -no-canonical-prefixes the default?
- References: <AANLkTimWTfEg6ERMHcXqSncZrfeZBkM6K770_dZenPUv@mail.gmail.com>
On Fri, 28 Jan 2011, Simon Baldwin wrote:
> A quick question about -no-canonical-prefixes...
>
> By default, gcc calls realpath() on prefixes generated relative to
> argv[0] in the gcc driver. If gcc is held as a "symlink farm" the
> realpath() makes it fail (absent a lot of messy -B, -L, -isytem and so
> on). It complains about not finding cc1 or cc1plus in libexec.
>
> -no-canonical-prefixes turns off realpath() to make gcc work cleanly
> when stored this way.
>
> Does anyone know a reason why -no-canonical-prefixes could not become
> the gcc default? Are there gcc configurations that must have the
> realpath()? The flag is benign on normally laid out gcc
> installations.
I think the point of the default is that you can create a symlink in your
PATH to a single gcc binary in a tree installed elsewhere, and that will
work OK because the symlink is resolved before locating the rest of the
tree. Certainly I use such symlinks for convenient access to
installations of different GCC versions.
--
Joseph S. Myers
joseph@codesourcery.com