I found the same problem after upgrading my Ubuntu to 11.10 version.
I use Netbeans for developing and solved the problem by specifying the "Mathematics" standard library as it follows:
Right click on project, click on Properties, select "Linker" on menu, click on "Libraries" and then "Add Standard Library" choosing "Mathematics".
When compiling the '-lm' option is placed after all the other options and it works. Probably this gcc version follows a specific architecture and it expects the libraries at the end of the command compiling line.
Cheers!
D.