[Ffmpeg-devel] Patch to allow cross-compile with MacOS X

Måns Rullgård mru
Wed Jul 12 02:33:54 CEST 2006


M?ns Rullg?rd <mru at inprovide.com> writes:

> Graham Booker <ffmpeglist at cod3r.com> writes:
>
>> On Jul 10, 2006, at 4:52 PM, M?ns Rullg?rd wrote:
>>
>>> Graham Booker <ffmpeglist at cod3r.com> writes:
>>>
>>>>> The problem with this is that some tests pass linker flags to the
>>>>> check_ld function, and passing linker flags when only compiling (as
>>>>> this would do) makes the compiler complain.
>>>>>
>>>>
>>>> Ugh...  Oddly enough it didn't complain for me.  I guess I am not
>>>> running into a situation where it does this.  Does it pass in compile
>>>> options or just link options?  When I looked at it, it seemed to just
>>>> be link options.  If it is just link, then maybe removing $@ from the
>>>> compile line (and its associated log line)?  I tried this locally,
>>>> and it seemed to work.
>>>
>>> Passing $@ to the commands is the whole point of the tests that pass
>>> these extra options, i.e. figuring out whether some linker option is
>>> supported.
>>
>> What I meant by the compile line is the first cc, which creates  the
>> .o file.  I fully meant to leave it in the second which links.   To
>> avoid ambiguity, the patch becomes:
>>
>> Index: configure
>> ===================================================================
>> --- configure   (revision 5649)
>> +++ configure   (working copy)
>> @@ -226,8 +226,10 @@
>>       log check_ld "$@"
>>       cat >$TMPC
>>       log_file $TMPC
>> -    log $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs
>> -    $cc $CFLAGS $LDFLAGS "$@" -o $TMPE $TMPC $extralibs >>$logfile 2>&1
>> +    log $cc $CFLAGS -c -o $TMPO $TMPC >>$logfile 2>&1
>> +    $cc $CFLAGS -c -o $TMPO $TMPC >>$logfile 2>&1
>> +    log $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs >>$logfile 2>&1
>> +    $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs >>$logfile 2>&1
>> }
>>
>> The $@ is still present in the second cc (link), just removed from
>> the first (compile).  This should still test the ldflags without any
>> issues.
>
> Sorry, I misunderstood what you meant.  That should work.

Committed a simplified version.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list