Would it make sense to have sysroot come from an environment variable?

Ian Lance Taylor iant@google.com
Fri Aug 26 20:56:00 GMT 2011

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.


More information about the Gcc-help mailing list