[FFmpeg-devel] [PATCH v2] configure fix arm inline defines

John Cox jc at kynesim.co.uk
Wed Jun 6 12:19:04 EEST 2018


>Hi
>
>Actually this is the same patch as before but master has been fixed s.t.
>enabling arm inline asm no longer breaks it:
>
>I believe there is a bug in the arm feature detection for inline asm in
>configure and I have a patch for it.
>
>Currently using a command line like:
>
>./configure --enable-cross-compile --arch=arm --cpu=cortex-a7
>--target-os=linux --cross-prefix=arm-linux-gnueabihf-
>
>gives in config.h:
>
>#define HAVE_ARMV5TE 1
>#define HAVE_ARMV6 1
>#define HAVE_ARMV6T2 1
>#define HAVE_ARMV8 0
>#define HAVE_NEON 1
>#define HAVE_VFP 1
>#define HAVE_VFPV3 1
>#define HAVE_SETEND 1
>...
>#define HAVE_ARMV5TE_EXTERNAL 1
>#define HAVE_ARMV6_EXTERNAL 1
>#define HAVE_ARMV6T2_EXTERNAL 1
>#define HAVE_ARMV8_EXTERNAL 0
>#define HAVE_NEON_EXTERNAL 0
>#define HAVE_VFP_EXTERNAL 1
>#define HAVE_VFPV3_EXTERNAL 1
>#define HAVE_SETEND_EXTERNAL 1
>...
>#define HAVE_ARMV5TE_INLINE 0
>#define HAVE_ARMV6_INLINE 0
>#define HAVE_ARMV6T2_INLINE 0
>#define HAVE_ARMV8_INLINE 0
>#define HAVE_NEON_INLINE 0
>#define HAVE_VFP_INLINE 0
>#define HAVE_VFPV3_INLINE 0
>#define HAVE_SETEND_INLINE 0
>
>With the patch below you get
>
>...
>#define HAVE_ARMV5TE 1
>#define HAVE_ARMV6 1
>#define HAVE_ARMV6T2 1
>#define HAVE_ARMV8 0
>#define HAVE_NEON 1
>#define HAVE_VFP 1
>#define HAVE_VFPV3 1
>#define HAVE_SETEND 1
>...
>#define HAVE_ARMV5TE_EXTERNAL 1
>#define HAVE_ARMV6_EXTERNAL 1
>#define HAVE_ARMV6T2_EXTERNAL 1
>#define HAVE_ARMV8_EXTERNAL 0
>#define HAVE_NEON_EXTERNAL 0
>#define HAVE_VFP_EXTERNAL 1
>#define HAVE_VFPV3_EXTERNAL 1
>#define HAVE_SETEND_EXTERNAL 1
>...
>#define HAVE_ARMV5TE_INLINE 1
>#define HAVE_ARMV6_INLINE 1
>#define HAVE_ARMV6T2_INLINE 1
>#define HAVE_ARMV8_INLINE 0
>#define HAVE_NEON_INLINE 0
>#define HAVE_VFP_INLINE 1
>#define HAVE_VFPV3_INLINE 1
>#define HAVE_SETEND_INLINE 1
>
>If I want to get Neon enabled as well then I need to have a --mfpu=neon
>on the command line too.  I'm not sure how to get it there unless I pass
>it as extra flags.
>
>This patch adds quotes around the asm that is in the __asm__ statement
>
>Regards
>
>John Cox
>
>diff --git a/configure b/configure
>index 22eeca22a5..4dbee8d349 100755
>--- a/configure
>+++ b/configure
>@@ -1040,7 +1040,7 @@ EOF
>
> check_insn(){
>     log check_insn "$@"
>-    check_inline_asm ${1}_inline "$2"
>+    check_inline_asm ${1}_inline "\"$2\""
>     check_as ${1}_external "$2"
> }
>_______________________________________________
>ffmpeg-devel mailing list
>ffmpeg-devel at ffmpeg.org
>http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Ping

This fixes the regression whereby no arm inline asm is ever enabled.

There is still the neon inline regression, but that will be another
patch.
Master now compiles OK with arm inline asm enabled. (Which it didn't 1st
time this patch was suggested)

JC


More information about the ffmpeg-devel mailing list