So far it seems that -lm is needed in place where earlier doesn't needed.
About multiple definition of `gnu_dev_major' etc. It is not warning, but error. I found this post which I think be the most relevant: http://us.generation-nt.com/answer/g...170398461.html
The glibc support for the C99 inline semantics was added in glibc 2.6 (via a large 2007-03-16 patch of Jakub's and some followups), and 2.6 is also the version where all the non-TLS support was removed. GCC 4.3 and later use C99 inline semantics in -std=gnu99 mode. To use any earlier version of glibc with GCC 4.3 you need at least to backport the large patch. Joseph S. Myers