[FFmpeg-cvslog] build: tms470: work around glibc math.h problems

Mans Rullgard git at videolan.org
Sun Oct 14 15:14:56 CEST 2012


ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Sat Oct 13 03:16:13 2012 +0100| [b6f8d635f27bd1234508679c93e04f60a36c2f1e] | committer: Mans Rullgard

build: tms470: work around glibc math.h problems

The glibc definitions of INFINITY and NAN do not work with the
tms470 compiler, nor do our usual fallbacks.

Signed-off-by: Mans Rullgard <mans at mansr.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6f8d635f27bd1234508679c93e04f60a36c2f1e
---

 compat/tms470/math.h |    7 +++++++
 configure            |    1 +
 2 files changed, 8 insertions(+)

diff --git a/compat/tms470/math.h b/compat/tms470/math.h
new file mode 100644
index 0000000..1104d74
--- /dev/null
+++ b/compat/tms470/math.h
@@ -0,0 +1,7 @@
+#include_next <math.h>
+
+#undef INFINITY
+#undef NAN
+
+#define INFINITY (*(const float*)((const unsigned []){ 0x7f800000 }))
+#define NAN      (*(const float*)((const unsigned []){ 0x7fc00000 }))
diff --git a/configure b/configure
index 3e29909..d8a5728 100755
--- a/configure
+++ b/configure
@@ -2911,6 +2911,7 @@ test -n "$libc_type" && enable $libc_type
 # hacks for compiler/libc/os combinations
 
 if enabled_all tms470 glibc; then
+    CPPFLAGS="-I${source_path}/compat/tms470 ${CPPFLAGS}"
     add_cppflags -D__USER_LABEL_PREFIX__=
     add_cppflags -D__builtin_memset=memset
     add_cppflags -D__gnuc_va_list=va_list -D_VA_LIST_DEFINED



More information about the ffmpeg-cvslog mailing list