PCH and moving gcc binaries after installation

James E Wilson wilson@specifixinc.com
Thu Mar 31 04:58:00 GMT 2005


Dan Kegel wrote:
> Moving an installed gcc/glibc crosstoolchain
> to a different directory was not allowed
> for gcc-2.96 and below, I seem to recall,
> but became permissible around gcc-3.0.

Moving trees around has worked for a long time, but it required manually 
setting the GCC_EXEC_PREFIX environment variable.  Cygnus got this 
working reliably sometime in the early '90s I think.

In gcc-3.0 and later, there is code (make_relative_prefix) that computes 
and sets GCC_EXEC_PREFIX for you, so now you no longer need to manually 
set an environment variable to make it work.  It just works by default.

Once GCC_EXEC_PREFIX is set, it overrides pretty much all of the builtin 
paths, and since GCC_EXEC_PREFIX is always set, either explicitly by the 
user, or implicitly by gcc, the builtin paths should be mostly irrelevant.

As for how this interracts with PCH, that I can't answer.  I haven't 
tried it.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list