Hi everyone!
I'm Gentoo Linux user and currently I play with Clang as default compiler.
And currently I tried to build ffmpeg 2.8.6 with Clang 3.9.0 and 
`-march=native` in C(XX)FLAGS (ffmpeg-2.8.6.ebuild automatically convert this 
to `--cpu=host` configure flag).
But I get `--cpu=host not supported with compiler clang` error on configure 
phase. It's seems like output of clang test compilation different from GCC's 
output.
I make a little patch that you can find in attachment to fix this issue. This 
is very similar to GCC's check_native method.
Thanks!
--- a/configure
+++ b/configure
@@ -3838,6 +3838,17 @@
             }
             cpu=$(check_native -march || check_native -mcpu)
         ;;
+        clang)
+            check_native(){
+                $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
+                sed -n "/cc1.*-target-cpu /{
+                            s/.*-target-cpu \\([^ ]*\\).*/\\1/
+                            p
+                            q
+                        }" $TMPE
+            }
+            cpu=$(check_native -march)
+        ;;
     esac
 
     test "${cpu:-host}" = host &&
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to