[FFmpeg-devel] [PATCH]Set isysroot instead of sysroot on darwin

Reimar Döffinger Reimar.Doeffinger at gmx.de
Tue Mar 18 08:28:28 CET 2014



On 18.03.2014, at 02:27, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Sun, Mar 16, 2014 at 03:08:04PM +0100, Carl Eugen Hoyos wrote:
>> Hi!
>> 
>> Newer versions of clang on Mac OSX ignore (?) --sysroot, it at least
>> doesn't work as expected from how gcc works. isysroot (alone!)
>> works, this page implies that this is expected behaviour on darwin:
>> http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00292.html
>> Attached patch fixes the issues I see on 10.9.
>> 
>> See also http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=00ba041c
>> 
>> Please comment, Carl Eugen
> 
>> configure |    5 +++++
>> 1 file changed, 5 insertions(+)
>> 89d45054153011c6f9ec006f059b61d92a49736d  patchisysrootdarwin.diff
>> diff --git a/configure b/configure
>> index 34200a3..c633364 100755
>> --- a/configure
>> +++ b/configure
>> @@ -3391,8 +3391,13 @@ add_asflags $extra_cflags
>> if test -n "$sysroot"; then
>>     case "$cc_type" in
>>         gcc|llvm_gcc|clang)
>> +            if test "$target_os" = darwin; then
>> +                add_cppflags -isysroot "$sysroot"
>> +                add_ldflags -isysroot "$sysroot"
>> +            else
>>             add_cppflags --sysroot="$sysroot"
>>             add_ldflags --sysroot="$sysroot"
>> +            fi
> 
> i cant really comment on this
> but if it doesnt work without this then its probably a good idea
> to apply

I still think that since having an extra -isysroot doesn't change anything it would be better to avoid the if and just always use

>> --sysroot="$sysroot" -isysroot "$sysroot"

Either way, some extra comments would be good, especially since if I remember right it is only a workaround for clang specifically.


More information about the ffmpeg-devel mailing list