[FFmpeg-devel] [patch] Option to specify Thumb instructions when building for arm.

Alex Converse alex.converse
Wed Dec 8 08:40:05 CET 2010

On Tue, Dec 7, 2010 at 11:18 PM, David Conrad <lessen42 at gmail.com> wrote:
> On Dec 7, 2010, at 8:51 AM, Mike Edenfield wrote:
>> On 12/7/2010 7:08 AM, Luca Barbato wrote:
>>> On 12/07/2010 12:33 AM, Mike Edenfield wrote:
>>>> This patch allows the user to use -mthumb to build Thumb 16-bit
>>>> instructions instead of -arm, which builds ARM 32-bit instructions.
>>>> Using -mthumb instead of -marm also defines __thumb__, which is needed
>>>> e.g. when building using the Android native toolchain.
>>>> (This patch eliminates the need to supply --extra-cflags to do a thumb
>>>> build.)
>>> doesn't that break the arm asm completely?
>> It builds and run fine here, but I'll be the first to admit I'm in a
>> tiny bit over my head. ?I'm mostly trying to simplify the configure
>> process for ffmpeg by eliminating as many custom CFLAGS options as I
>> can. ?Its entirely possible that I'm making this way to hard, in which
>> case I'd be grateful for someone to clarify for me :)
>> The motivation behind the patch is trying to use the Android native
>> tools as a cross-compiler. ?Trying to build just using the --enable-arm
>> support gave me a few problems:
>> 1. The system headers supplied by the NDK don't compile:
>> /opt/android-ndk-r5/platforms/android-5/arch-arm/usr/include/asm/byteorder.h:
>> In function '___arch__swab32':
>> /opt/android-ndk-r5/platforms/android-5/arch-arm/usr/include/asm/byteorder.h:25:
>> error: expected ')' before ':' token
>> I only investigated this problem far enough to figure out that the
>> offending asm() statement is behind an #ifndef __thumb__ block.
> If you're squeamish about changing system headers (or about telling Android to fix their broken headers; -std=c99 is the flag that breaks them) another option is to add -fasm to ffmpeg cflags.
> But you should at least tell them that their headers are broken.

I've been told that messing with sysroot fixes it but haven't had a
chance to try it. (My dev system has been screwed up for weeks thanks
to Canonical shipping a broken e1000e driver)



More information about the ffmpeg-devel mailing list