The page http://gcc.gnu.org/gcc-4.3/changes.html#mpfropts says libm is being replaced with libmpfr. I set out to remove all the excess references to "-lm" in the configure scripts and Makefiles produced.
I found that I could remove "-lm" from everywhere and GCC _compiled_ OK. When I ran the testsuite there where a lot of extra errors in Gfortran so I put the un-modified configure file back and re-compiled GCC. I noticed that everything still compiled OK but the errors in libstdc++ where not well explained in the logs. I investigated and found that collect2 may have some problems with including "-lm" even when it is not specified on the command line. GNU C version 4.3.0 20070619 (experimental), GMP version 4.2.1, MPFR version 2.3.0-dev. GNU assembler version 2.17.50 (i686-pc-linux-gnu) using BFD version (GNU Binutils) 2.17.50.20070426 # /opt/gcc-4_3-build-2/gcc/collect2 -v collect2 version 4.3.0 20070619 (experimental) (i386 Linux/ELF) /usr/bin/ld -v GNU ld (GNU Binutils) 2.17.50.20070426 See these tests results for a further explanation: http://gcc.gnu.org/ml/gcc-testresults/2007-06/msg00919.html -- Summary: GCC Collect2 adds extra "-lm"'s to link commands even when not linking with "-lm". Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rob1weld at aol dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32411