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

Graham Booker ffmpeglist
Mon Jul 10 23:23:19 CEST 2006


On Jul 10, 2006, at 3:33 PM, M?ns Rullg?rd wrote:

> <snip>
> No changes needed to makefiles?
>

Nope, using the patch I pasted with the configure command I listed  
produces a makefile which can cross compile.  It didn't used to, but  
sometime in the past several weeks someone changes something that  
fixed that.  I have even tested to make sure that the binary compiled  
on the ppc machine works on the i386 machine.

>> It was created against svn 5649, but still applies to svn 5706.  I am
>> including the text of the patch here because it is short and the list
>> stripped the attachment the first time I tried to send it:
>>
>> 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
>> }
>> check_cflags(){
>
> 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.

> Use --cc='gcc -isysroot whatever' until we think of something better.
>

Yeah, this works in our case.  Looking forward to "something better"

> Visiting whoever designed that option handling with a large cluebat
> would be something to start with.

Yeah, it is understandable if the options were different, but when  
they are the same it really shouldn't complain

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





More information about the ffmpeg-devel mailing list