Ferenc Wágner
2018-01-24 21:36:36 UTC
Hi,
Since ceil() can be inlined when optimization is enabled, I use
AC_SEARCH_LIBS([ceil], [m], , [AC_MSG_ERROR([ceil not found])])
AC_SUBST([m_LIBS], [$LIBS])
to link against libm only when necessary (that is, when ceil is not
inlined). However, it does not work because GCC says in config.log:
conftest.c:76:6: warning: conflicting types for built-in function 'ceil'
char ceil ();
~~~~
and inlining is disabled, thus ceil becomes an undefined reference
without -lm. However, in the actual code where math.h is #included, the
above warning does not happen, ceil is inlined and I unnecessarily link
with -lm. How could I overcome this?
Please Cc me, I'm not subscribed.
Since ceil() can be inlined when optimization is enabled, I use
AC_SEARCH_LIBS([ceil], [m], , [AC_MSG_ERROR([ceil not found])])
AC_SUBST([m_LIBS], [$LIBS])
to link against libm only when necessary (that is, when ceil is not
inlined). However, it does not work because GCC says in config.log:
conftest.c:76:6: warning: conflicting types for built-in function 'ceil'
char ceil ();
~~~~
and inlining is disabled, thus ceil becomes an undefined reference
without -lm. However, in the actual code where math.h is #included, the
above warning does not happen, ceil is inlined and I unnecessarily link
with -lm. How could I overcome this?
Please Cc me, I'm not subscribed.
--
Thanks,
Feri
Thanks,
Feri