[FFmpeg-devel] [PATCH] Add clang to detected compilers

David Conrad lessen42
Thu Oct 22 23:19:18 CEST 2009


On Oct 22, 2009, at 5:03 PM, M?ns Rullg?rd wrote:

> David Conrad <lessen42 at gmail.com> writes:
>
>> Hi,
>>
>> __VERSION__ is kinda boring, it's always "4.2.1 Compatible Clang
>> Compiler" instead of giving the actual clang version.
>
> I guess there's nothing we can do about that.

There's __clang__ and __llvm__ ints, but they don't really correspond  
to the version either (they're both 1 atm.)

>> commit d773dc5bf7ae26fb1feb4a29ebd3990162b6353b
>> Author: David Conrad <lessen42 at gmail.com>
>> Date:   Wed Oct 21 00:52:36 2009 -0400
>>
>>    Add clang to detected compilers
>>
>> diff --git a/configure b/configure
>> index 1e416c4..1139ea6 100755
>> --- a/configure
>> +++ b/configure
>> @@ -1590,6 +1590,11 @@ elif $cc -version 2>/dev/null | grep -q  
>> TMS470; then
>>             esac
>>         done
>>     }
>> +elif $cc -v 2>&1 | grep -q clang; then
>> +    cc_type=clang
>> +    cc_version=__VERSION__
>> +    CC_DEPFLAGS='-MMD'
>> +    AS_DEPFLAGS='-MMD'
>> fi
>>
>> test -n "$cc_type" && enable $cc_type || echolog "Unknown C  
>> compiler $cc"
>> @@ -1615,6 +1620,10 @@ if test -n "$sysroot"; then
>>             add_cppflags -I"$sysinclude"
>>             add_ldflags  --sysroot="$sysroot"
>>         ;;
>> +        clang)
>> +            add_cppflags -isysroot="$sysroot"
>> +            add_ldflags -isysroot="$sysroot"
>> +        ;;
>>     esac
>> fi
>>
>> @@ -2464,6 +2473,8 @@ elif enabled ccc; then
>>     add_cflags -msg_disable unreachcode
>> elif enabled gcc; then
>>     check_cflags -fno-tree-vectorize
>> +elif enabled clang; then
>> +    check_cflags -Qunused-arguments
>> fi
>>
>> if enabled gprof; then
>
> OK.  I assume you've tested it.

Yep, applied.



More information about the ffmpeg-devel mailing list