This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc --prefix in chrooted environment
- From: Michael Zintakis <michael dot zintakis at googlemail dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sun, 27 Mar 2011 04:00:42 +0100
- Subject: Re: gcc --prefix in chrooted environment
- References: <4D8DC506.9030308@googlemail.com> <mcrzkohiwgj.fsf@google.com>
When I compile, build and install GCC (to use it later on in chrooted
environment) and specify the --prefix as, say
${HOME}/gcc-test/install/install-{TARGET}, what effect, if any, that
would have if I am later on chrooting to ${HOME}/gcc-test/install in
order to compile, build and install the rest of the software in the
(then) /install-{TARGET} and use the same GCC (which will reside in
/install-{TARGET}/bin instead of
${HOME}/gcc-test/install/install-{TARGET}/bin when I initially built
and installed GCC) and would this also affect how GCC will look for
its library files?
If I understand this, it should not have any effect. If you pick up the
entire gcc install tree and move it somewhere else, gcc should continue
to work fine (you can't move just part of it around, but you can move
the whole thing as a unit). That is effectively what you are doing
here.
Thanks Ian. Just to clarify once again to make sure:
If I compile gcc (using
"--prefix=${HOME}/gcc-test/install/install-ppc/usr") and later on
install it in "${HOME}/gcc-test/install/install-ppc", then do the same
with the associated libraries gcc uses (glibc, mpfr etc) and then
"chroot ${HOME}/gcc-test/install/install-ppc" and try to run gcc as
normal (i.e. compile the packages I want to install on that "root")
would that work even though I compiled and installed gcc with a
different prefix?