Originally committed as revision 25028 to svn://svn.ffmpeg.org/ffmpeg/trunk
Måns Rullgård authored on 2010/09/03 06:41:07... | ... |
@@ -1799,7 +1799,16 @@ filter_cflags=echo |
1799 | 1799 |
filter_cppflags=echo |
1800 | 1800 |
filter_asflags=echo |
1801 | 1801 |
|
1802 |
-if $cc -v 2>&1 | grep -qi ^gcc; then |
|
1802 |
+if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then |
|
1803 |
+ cc_type=llvm_gcc |
|
1804 |
+ cc_version=__VERSION__ |
|
1805 |
+ gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)') |
|
1806 |
+ cc_ident="llvm-gcc $($cc -dumpversion) $gcc_extra_ver" |
|
1807 |
+ CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
|
1808 |
+ AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@' |
|
1809 |
+ speed_cflags='-O3' |
|
1810 |
+ size_cflags='-Os' |
|
1811 |
+elif $cc -v 2>&1 | grep -qi ^gcc; then |
|
1803 | 1812 |
cc_type=gcc |
1804 | 1813 |
cc_version=__VERSION__ |
1805 | 1814 |
gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)') |
... | ... |
@@ -1969,7 +1978,7 @@ add_asflags $extra_cflags |
1969 | 1969 |
|
1970 | 1970 |
if test -n "$sysroot"; then |
1971 | 1971 |
case "$cc_type" in |
1972 |
- gcc) |
|
1972 |
+ gcc|llvm_gcc) |
|
1973 | 1973 |
add_cppflags --sysroot="$sysroot" |
1974 | 1974 |
add_ldflags --sysroot="$sysroot" |
1975 | 1975 |
;; |
... | ... |
@@ -1988,7 +1997,7 @@ if test "$cpu" = host; then |
1988 | 1988 |
enabled cross_compile && die "--cpu=host makes no sense when cross-compiling." |
1989 | 1989 |
|
1990 | 1990 |
case "$cc_type" in |
1991 |
- gcc) |
|
1991 |
+ gcc|llvm_gcc) |
|
1992 | 1992 |
check_native(){ |
1993 | 1993 |
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return |
1994 | 1994 |
sed -n "/$1=/{ |
... | ... |
@@ -2876,6 +2885,8 @@ elif enabled gcc; then |
2876 | 2876 |
check_cflags -fno-tree-vectorize |
2877 | 2877 |
check_cflags -Werror=implicit-function-declaration |
2878 | 2878 |
check_cflags -Werror=missing-prototypes |
2879 |
+elif enabled llvm_gcc; then |
|
2880 |
+ check_cflags -mllvm -stack-alignment=16 |
|
2879 | 2881 |
elif enabled clang; then |
2880 | 2882 |
check_cflags -mllvm -stack-alignment=16 |
2881 | 2883 |
check_cflags -Qunused-arguments |