[FFmpeg-cvslog] build: Support building using clang-usan and disable-optimization

Katerina Barone-Adesi git at videolan.org
Fri May 16 22:44:25 CEST 2014


ffmpeg | branch: master | Katerina Barone-Adesi <katerinab at gmail.com> | Fri May 16 18:07:34 2014 +0200| [4d25c2bc76f0a708c2ba470b6bfeb547efe37115] | committer: Luca Barbato

build: Support building using clang-usan and disable-optimization

Clang Undefined Behaviour Sanitizer seems to make non-constant constant
expressions, making the compilation fail when they are used within
inline assembly if no optimization is requested.

Add -O1 to the cflags to hide the misbehaviour.

Bug-Id: 683

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

 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 6f84dfa..74a4df1 100755
--- a/configure
+++ b/configure
@@ -2443,7 +2443,7 @@ case "$toolchain" in
     ;;
     clang-usan)
         cc_default="clang"
-        add_cflags  -fsanitize=undefined
+        add_cflags  -fsanitize=undefined -O1
         add_ldflags -fsanitize=undefined
     ;;
     gcc-asan)



More information about the ffmpeg-cvslog mailing list