Just, I think, it is trying to link with libm.a, that is compiled using
GCC 4.0, so, the fail.

Doesn't your distro have a gcc_select?

<rant>

Nope. That's Debian for you : Debian users are supposed to be big hunks
of programmers, and not to flinch on such petty details (the epitome of
"Real men don't write in Pascal" mentality...). At least, that's the
impression you get reading postings of some Ordained Debian Developpers
(TM) on some Debian mailing lists. The simple notion of Debian end-users
totally overwhelms them...

Curiously, Debian has such a mechanism for handling "default" choices
about equivalent programs : the "/etc/alternatives" directory. But some
ODD (TM) decided, in his (according to himself) infinite wisdom that
such an easy way to swich gccs was too easy for common users, and that
it might twarth some obscure utterly Debianish hack.