This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Would it make sense to have sysroot come from an environment variable?
Bryan Ischo <bryan@ischo.com> writes:
> Thank you for your reply. So just to be clear, are you saying that I
> would configure gcc --with-sysroot=DIR, and then at runtime I can do:
>
> $ mv DIR DIR.moved
> $ /some/random/path/to/gcc
>
> And that gcc, which was installed in a place that had nothing to do
> with DIR, will somehow know that I moved DIR? How does it do that?
Yes, that is what I am saying. The key is that gcc itself is under
DIR--it's in DIR/bin. It looks at argv[0] to see where it was run from.
Ian