This is the mail archive of the
mailing list for the GCC project.
Re: Installation proposal
- From: Mark Mitchell <mark at codesourcery dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 27 Feb 2002 18:29:42 -0000
- Subject: Re: Installation proposal
> Or, are you saying that you somehow want GCC to recognize the
> directory into which it was installed and access all files with relative
> paths so that $prefix no longer would be built into the compiler and only
> used for installation?
Yes -- but I think that it is a no-op. IIRC, patches to make this work
already went in.
If not, consider my proposal to assume that this works. If it does not,
I may try to implement it.
(The way that, in general, such schemes work is:
a) Use an environment variable.
b) OS-dependent magic to find the binary that is currently executing.
c) Search the PATH to find argv, if argv is not absolute.
There are ways to fool this logic (various uses of links, and such), but
the environment variable gives you a fallback, and in practice such schemes
work very nicely.)