[Android] [PATCH 6/7] contrib: ffmpeg: Disable fPIC when compiling for Android x86
Rafaël Carré
funman at videolan.org
Mon Jul 23 16:49:59 CEST 2012
Did you ask libav or ffmpeg people about this?
Le 2012-07-23 05:54, Edward Wang a écrit :
> Disable fPIC due to resolved problems in libav/ffmpeg suite.
> ---
> contrib/src/ffmpeg/rules.mak | 16 +++++++++++++++-
> contrib/src/postproc/rules.mak | 7 +++++++
> 2 files changed, 22 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
> index ed6d8e8..c36bd7c 100644
> --- a/contrib/src/ffmpeg/rules.mak
> +++ b/contrib/src/ffmpeg/rules.mak
> @@ -81,7 +81,21 @@ endif
>
> # Linux
> ifdef HAVE_LINUX
> -FFMPEGCONF += --target-os=linux --enable-pic
> +FFMPEGCONF += --target-os=linux
> +
> +ifeq ($(ANDROID_ABI), x86)
> +ifdef HAVE_ANDROID
> +# --disable-pic because Android-x86 fPIC isn't compatible with libav ASM:
> +# libavcodec/x86/mpegaudiodec_mmx.c:73: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> +# libavcodec/x86/mpegaudiodec_mmx.c:73: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
> +# libavcodec/x86/mpegaudiodec_mmx.c:73: error: 'asm' operand has impossible constraints
> +FFMPEGCONF += --disable-pic
> +FFMPEG_CFLAGS += -fno-PIC
> +endif # HAVE_ANDROID
> +else
> +FFMPEGCONF += --enable-pic
> +endif
> +
> endif
>
> # Windows
> diff --git a/contrib/src/postproc/rules.mak b/contrib/src/postproc/rules.mak
> index 6271b50..518865d 100644
> --- a/contrib/src/postproc/rules.mak
> +++ b/contrib/src/postproc/rules.mak
> @@ -47,6 +47,13 @@ endif
> # Linux
> ifdef HAVE_LINUX
> POSTPROCCONF += --target-os=linux
> +
> +ifeq ($(ANDROID_ABI), x86)
> +ifdef HAVE_ANDROID
> +POSTPROC_CFLAGS += -fno-PIC
> +endif # HAVE_ANDROID
> +endif
> +
> # --enable-pic
> endif
>
>
More information about the Android
mailing list