This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: canadian cross trouble with libiberty location
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Daniel Kegel <dank at kegel dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 16 May 2004 19:20:57 -0700
- Subject: Re: canadian cross trouble with libiberty location
- References: <40A56347.5040308@kegel.com>
Daniel Kegel wrote:
`../i686-pc-linux-gnu/libiberty/libiberty.a', needed by `gengenrtl'. Stop.
make[1]: Leaving directory
`/usr/local/google/toolchain.dkegel/crosstool-0.28-rc14/build/i686-unknown-linux-gnu/gcc-3.3.3-glibc-2.1.3/build-gcc-core/gcc'
gcc/Makefile.in expects to find libiberty in ../libiberty if
build==host. Otherwise, it looks for it in ../$build/libiberty. We
can't use ../libiberty in this case because it was compiled for the
host, not the build machine.
That seems reasonable, except this only works if we build the
$build/libiberty directory. This is supposed to happen via the toplevel
configure. If host_alias != build_alias, then it puts libiberty in
build_modules. It will then add a dependency
maybe-all-build-libiberty: all-build-libiberty
to the Makefile. Since all-gcc has a dependence on
maybe-all-build-libiberty, this should force all-build-libiberty to be
built.
At least, that is how it works in current sources, and gcc-3.4. In
gcc-3.3 it is a bit different, ALL_BUILD_MODULES gets set to
all-build-libiberty.
Ah, I see the problem. You didn't explicitly say what make command you
used, but it is fairly obvious that you did
make all-gcc
This won't work, because all-gcc does not depend on ALL_BUILD_MODULES.
If you do
make all
it will work. Or alternatively, you can do
make all-build-libiberty
make all-gcc
In gcc-3.4, just "make all-gcc" will work fine. Nathanael Nerode fixed
this. Explicitly adding "make all-build-libiberty" should work for any
modern gcc version, so it should be OK to hard code that if it is simpler.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com