This is the mail archive of the gcc@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]
Other format: [Raw text]

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[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


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