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: gcc_tooldir


Marcus Comstedt <marcus@mc.pp.se> writes:

> > I've been testing relocation every release since 3.1, and it does work.
> 
> How?  If $prefix is /usr/local, then $libdir will be /usr/local/lib,
> $libsubdir will be /usr/local/lib/gcc/target/3.4, and $gcc_tooldir
> will be /usr/local/lib/gcc/target/3.4/../../../target.  If you move
> gcc from /usr/local, then /usr/local/lib/gcc/target/3.4/ will not
> exist and the entire path will be illegal.  How can that work?
> How would it work less if $gcc_tooldir was /usr/local/target?

You set the environment variable GCC_EXEC_PREFIX.

http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Environment-Variables.html#Environment%20Variables

Using $(unlibsubdir) lets you move the entire tree and change only one
environment variable.

If $gcc_tooldir is /usr/local/target, it is much harder to figure out
how to parse that with respect to a changed GCC_EXEC_PREFIX, because
you don't know how many layers to peel off the top.

Ian


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