Bootstrapping is a way get a well-defined environment independent of the system you're starting from. When using bootstrapping for this purpose (and not doing bootstrapping as a way to establish trust in the running binaries), the starting point is usually "any C compiler from host" as that is something available almost everywhere.
The first thing you then build is gcc 4.7.4, the last gcc still written in C. In other words, you use a pretty recent C compiler to build a quite old one; in particular, you're running quite old configure scripts. In the configure script of its dependency gmp one of the tests is trying to find out how to link the math library. It is done by calling $CC_FOR_BUILD conftest.c -lm on the the file conftest.c with the following contents.
int main () { exit(0); } double d; double foo () { return log (d); }
The solution hence was to use a wrapper script around the compiler (the diff is not well formatted, the actual insertion starts at new line 150) calling it with the desired flags and make that the CC to use.