Linking flex: undefined reference to __powf_finite

Been trying to link flex to my program (centos linux, gcc 4.8.2) and I get undefined reference to __powf_finite. I do have -lm in my linker options, but when I do:

nm libm.so

there’s no __powf_finite implemented in it. Do I need to link with some other library as well?

Thanks,
E.