4.4.2010 19:08, Phil Couling kirjoitti:
Hi I'm trying to cross compile GCC To save confusion here I mean I'm building GCC with a cross compiler and not building GCC as a cross compiler. I'm getting the following error while running configure: checking for correct version of gmp.h... yes checking for correct version of mpfr.h... no configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+. I'm at a loss for why the mpfr.h check is failing. I'm running configure with: ./gcc-4.3.3/configure --host=arm-none-linux-gnueabi --prefix=/built --with-gmp=/built --with-mpfr=/built I'm working on the assumption that this error is referring to libraries that must be available under the host environment.
Yes, the 'arm-none-linux-gnueabi' ones...
I've downloaded and built gmp-5.0.1 and mpfr-2.4.2 and installed them to the prefix "/built".
I would assume them then going to the '$prefix/include' and '$prefix/lib'. In a native build into '/usr/include' and '/usr/lib'. A native installation is quite individual, it has its own totally private "system directories" where to put all the stuff... BUT a crosscompiler is a 'portable' GCC which usually will be put among other crosscompilers and they all use the same common $prefix. So for it the $prefix is only that "common member" in the search paths, the private "system directories" are in $tooldir aka '$prefix/$target'. There are the 'bin', 'include' and 'lib' which a native install has in '/usr'... So you should have the 'arm-none-linux-gnueabi' headers and libs in : /built/arm-none-linux-gnueabi/include /built/arm-none-linux-gnueabi/lib Ie. when configuring already know the difference between '--prefix=' in a native and in a cross case. When producing and installing any target libraries (made for the target $host), one must use the '--prefix=$tooldir but with binutils and GCC use the common $prefix (stuff will be made for the cross $host)
The /built directory only contains these and binutils.
The '$prefix/bin' has only the '$target-<tool>'s not any bare-name '<tool>'s like 'as', 'ld', 'nm' for the cross-GCC to use. The '/built' so can only have things for YOU to use, not anything for the cross-GCC to use! The '$tooldir' has the things the cross-GCC needs...