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

David Conrad lessen42
Sat Oct 3 00:07:39 CEST 2009


On Oct 2, 2009, at 4:58 PM, M?ns Rullg?rd wrote:

> 4a. For iPhone 3GS or iPod Touch 3G 32GB/64GB, use this command:
>    ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/ 
> usr/bin/arm-apple-darwin9-gcc-4.2.1 --as='gas-preprocessor.pl / 
> Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple- 
> darwin9-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/ 
> Developer/SDKs/iPhoneOS3.1.sdk --enable-cross-compile --target- 
> os=darwin --arch=arm --cpu=cortex-a8 --enable-pic
> 4b. For other iPhone or iPod Touch models, use this command:
>    ./configure --cc=/Developer/Platforms/iPhoneOS.platform/Developer/ 
> usr/bin/arm-apple-darwin9-gcc-4.2.1 --as='gas-preprocessor.pl / 
> Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple- 
> darwin9-gcc-4.2.1' --sysroot=/Developer/Platforms/iPhoneOS.platform/ 
> Developer/SDKs/iPhoneOS3.1.sdk --enable-cross-compile --target- 
> os=darwin --arch=arm --cpu=arm1176jzf-s
> 5.  Run make.
>
> It is important to specify a correct --cpu option, and not merely an
> architecture version.  Failure to specify the exact CPU will give a
> broken build.

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.



More information about the ffmpeg-devel mailing list