Installation proposal
Mark Mitchell
mark@codesourcery.com
Wed Feb 27 10:48:00 GMT 2002
> 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[0], if argv[0] 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.)
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
More information about the Gcc
mailing list