I'm currently trying to compile GCC 4.9.2 using GCC 4.2. The problem I have run into is that I have a working GMP installation (6.0.0a) but GCC fails to link to it after a while. The error I get is:
Undefined reference to __gmpn_invert_limb
and then it shows some methods that use that function, although make check (on gmp) determined that this function is working fine.
./configure --prefix=/usr/local/lib/gcc --with-gmp=/prefix/path/of/gmp/configure make
PS: I also tried downloading the gmp source and putting it in gcc/gmp like I did with mpfr. Same result.