On Tuesday 31 May 2011 13:57:08 Måns Rullgård wrote:
> Gavin Kinsey <[email protected]> writes:
<snip patch>
> > This patch breaks my Android build for ARMv7. The error message I get
> > is:
> >
> > libavutil/arm/intmath.h: In function 'av_clip_uintp2_arm':
> > libavutil/arm/intmath.h:81: warning: asm operand 2 probably doesn't
> > match constraints
> > libavutil/arm/intmath.h:81: error: impossible constraint in 'asm'
>
> The compiler isn't inlining the function properly. Get a better
> compiler.
Until Google update the NDK that isn't an option.
> > This is using the Android NDK cross-compiler with the following ffmpeg
> > configure flags:
> > --disable-static --enable-shared --disable-ffmpeg --disable-ffprobe
> > --disable- ffserver --disable-avdevice --disable-avfilter
> > --enable-cross-compile --
> > sysroot=/home/gkinsey/src-ext/android-ndk/platforms/android-8/arch-arm
> > -- target-os=linux --cross-prefix=/home/gkinsey/src-ext/android-
> > ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-l
> > inux- androideabi- --disable-symver --arch=arm-v7a
> > --extra-cflags='-march=armv7-a - mfloat-abi=softfp'
> > --extra-ldflags='-Wl,--fix-cortex-a8' --enable-debug
>
> Where did you get the idea for all those flags?
The Android NDK documentation for the cflags and ldflags, disable-symver is
required to build ffmpeg for Android, in fact IIRC Android is the reason the
option was created. Cross compile flags are standard stuff, the rest is just
disabling crap I don't need to make the build a bit quicker.
>From Android NDK doc STANDALONE-TOOLCHAIN.html
"""
If you want to target the 'armeabi-v7a' ABI, you will need ensure that the
following two flags are being used:
CFLAGS='-march=armv7-a -mfloat-abi=softfp'
Note: The first flag enables Thumb-2 instructions, and the second one
enables H/W FPU instructions while ensuring that floating-point
parameters are passed in core registers, which is critical for
ABI compatibility. Do *not* use these flags separately!
If you want to use Neon instructions, you will need one more compiler flag:
CFLAGS='-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
Note that this forces the use of VFPv3-D32, as per the ARM specification.
Also, is is *required* to use the following linker flags that routes around
a CPU bug in some Cortex-A8 implementations:
LDFLAGS='-Wl,--fix-cortex-a8'
"""
--
Gavin Kinsey
AD Holdings Plc
Closed IPTV, the new safe and secure deterministic IP Video solution from
Dedicated Micros, is now shipping through selected distributors.
- Come and see this award winning plug and play, IP Video innovation at one of
our Roadshows around the UK visit:
https://www.dedicatedmicros.com/europe/ClosedIPTVRoadshow2011
- Contact our Customer Services Team for more information regarding how to
enter the world of safe and secure hybrid IP and analogue video surveillance
systems.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel