[FFmpeg-devel] iOS Cross Compile issues

Gerhard Roethlin gerhard at disneyresearch.com
Tue Dec 20 14:15:42 CET 2011


On 2011.12.20, at 11:52, Reimar Döffinger wrote:

> On Tue, Dec 20, 2011 at 08:32:55AM +0100, Gerhard Roethlin wrote:
>> This patch fixes problems when compiling ffmpeg with apple's iOS SDK, maybe
>> caused by the old compiler shipped with it. The solution is similar to that
>> in commit f7de5235.
>> I am aware that this just hides the problem, but I have no arm asm knowledge,
>> so I can not provide a real solution.
>> 
>> This is the error message:
>>> make V=1
>> /Developer4/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc -I. -I./ --sysroot=/Developer4/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -DHAVE_AV_CONFIG_H -arch armv7 -mcpu=cortex-a8 -std=c99 -fomit-frame-pointer -fPIC -marm -g -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -O3 -fno-math-errno -mllvm -stack-alignment=16  -MMD -MF libavfilter/af_volume.d -MT libavfilter/af_volume.o -c -o libavfilter/af_volume.o libavfilter/af_volume.c
>> error: invalid operand in inline asm: 'adds   $1, ${2:R}, ${2:Q}, lsr #31  
>> 	itet   ne                     
>> 	mvnne  $1, #1<<31             
>> 	moveq  $0, ${2:Q}                
>> 	eorne  $0, $1,  ${2:R}, asr #31  
>> 	'
> 
> Could you please find out where exactly the issue lies?
> E.g. by randomly commenting out instructions (if it is something that
> has to do with instructions, and not asm arguments).
> That error message seems very strange to me, I don't think I've
> ever seen one like that.

The first problem in this function is triggered by removing any of the commented out lines. Instead of commenting out the whole line, removing the "R" and "Q" also makes the compiler errors go away, but I have my doubts that either offers the same semantic as the original.

static av_always_inline av_const int32_t av_clipl_int32_arm(int64_t a)
{
    int x, y;
    __asm__ (//"adds   %1, %R2, %Q2, lsr #31  \n\t"
             "itet   ne                     \n\t"
             "mvnne  %1, #1<<31             \n\t"
             //"moveq  %0, %Q2                \n\t"
             //"eorne  %0, %1,  %R2, asr #31  \n\t"
             : "=r"(x), "=&r"(y) : "r"(a):"cc");
    return x;
}

The second problem doesn't seem to be triggered anymore, not sure why. Maybe a change in ffmpeg since last friday.

Gerhard Röthlin



More information about the ffmpeg-devel mailing list