[FFmpeg-devel] [HOWTO] Building FFmpeg for iPhone

David Conrad lessen42
Wed Oct 7 14:27:05 CEST 2009


On Oct 7, 2009, at 8:12 AM, Jason Millard wrote:

>> You should add -arch armv7 to cflags and ldflags for 4a and -arch
>>>> armv6 for 4b (the warning about -force_cpusubtype_ALL indicates  
>>>> that
>>>> this will be required in the future.) This sets a specific cpu  
>>>> subtype
>>>> for the mach-o file, which allows you lipo together binaries.
>>>>
>>>
>>> I tried that, and got this error:
>>>
>>> cc1: error: unrecognized command line option "-arch"
>>>
>>> The warning is harmless, and only shows that Apple's compiler team  
>>> are
>>> a bunch of idiots, but we knew that already.
>>>
>>
>> Oops, -arch is only recognized by "gcc" not "arm-apple-darwin9- 
>> gcc-4.2.1".
>> So you'd need
>> --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc
>>
>> The advantage of specifying it is that you can have a single binary  
>> that
>> has full NEON opts, but still works on the older devices.
>
>
> I've tried to compile using the gcc instead of arm-apple-darwin9- 
> gcc-4.2.1
> suggestion
>
>   ./configure
> --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -- 
> as='
> gas-preprocessor.pl/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc'
> --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ 
> iPhoneOS3.1.sdk
> --enable-cross-compile --target-os=darwin --arch=armv6 -- 
> cpu=arm1176jzf-s
>
> and get
>
>   /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is  
> unable to
> create an executable file. C compiler test failed.
>
> I tried with "gcc-4.2.1" with the same result. Is there something  
> else I
> should be doing?

--arch=arm --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6'



More information about the ffmpeg-devel mailing list