lavu: test for broken binutils on ARM
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 15 Dec 2012 19:46:33 +0000 (20:46 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 5 Jan 2013 15:25:37 +0000 (16:25 +0100)
Some old gnu assemblers fail to assemble qdadd correctly
Ideally we should check this at build time, but better to
check at run time than mysteriously failing.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavutil/utils.c

index 01c940c..fbfbc49 100644 (file)
@@ -35,6 +35,11 @@ unsigned avutil_version(void)
     av_assert0(LIBAVUTIL_VERSION_MICRO >= 100);
     av_assert0(HAVE_MMX2 == HAVE_MMXEXT);
 
+    if (av_sat_dadd32(1, 2) != 5) {
+        av_log(NULL, AV_LOG_FATAL, "Libavutil has been build with a broken binutils, please upgrade binutils and rebuild\n");
+        abort();
+    }
+
     return LIBAVUTIL_VERSION_INT;
 }