Hi everyone When trying to build gettext-tools with LTO enabled and at least -O1 I encountered that gl_MATHFUNC (from mathfunc.m4) returns that 'pow' can be used without having to link to libm (and therefore all other math functions as well). Unfortunately this is only true for certain cases, but the way log10 is used in the portions of gnulib embedded in gettext-tools is not one of them, resulting in a "undefined reference" during linkage.
As it seems, the log10 usability test (log10.m4) gets it right: by defining at least one variable as volatile the compiler won't use any builtin functions for this test and correctly throw an error "undefined reference". Another option would be to add -fno-builtin to CFLAGS for this test, but I have no idea how portable that would be. Best regards, Tiziano
