OSDN Git Service

Stricter check for math.h functions
authorMåns Rullgård <mans@mansr.com>
Wed, 10 Feb 2010 22:14:28 +0000 (22:14 +0000)
committerMåns Rullgård <mans@mansr.com>
Wed, 10 Feb 2010 22:14:28 +0000 (22:14 +0000)
GCC is sometimes able to optimise constant calls to these functions,
incorrectly indicating that they exist.  Unoptimised calls will then
fail to link.

Originally committed as revision 21749 to svn://svn.ffmpeg.org/ffmpeg/trunk

configure

index f324e17..b28b468 100755 (executable)
--- a/configure
+++ b/configure
@@ -675,7 +675,8 @@ check_mathfunc(){
     disable $func
     check_ld "$@" <<EOF && enable $func
 #include <math.h>
-int main(void){ $func(0); return 0; }
+float foo(float f) { return $func(f); }
+int main(void){ return 0; }
 EOF
 }