[FFmpeg-devel] [PATCH 17/17] ARM: improve VFP ABI check

Janne Grunau janne-ffmpeg
Tue Jan 18 21:18:08 CET 2011


On Tue, Jan 18, 2011 at 07:32:21PM +0000, Mans Rullgard wrote:
> Recent gcc versions define __ARM_PCS or __ARM_PCS_VFP to indicate the
> VFP ABI in use, and ARM RVCT defines __SOFTFP__ when using this ABI.
> If none of these are defined, check $cross_prefix and $cc for the
> substring "hardfloat", and finally fall back to a linker test.  This
> gives the correct result in most configurations.
> ---
>  configure |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/configure b/configure
> index 3f7eed8..895b855 100755
> --- a/configure
> +++ b/configure
> @@ -2526,10 +2526,18 @@ elif enabled arm; then
>      check_cflags -marm
>      nogas=die
>  
> -    check_ld <<EOF && enable vfp_args
> +    if     check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
> +        enable vfp_args
> +    elif ! check_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__"; then
> +        case "${cross_prefix:-$cc}" in
> +            *hardfloat*)         enable vfp_args;   fpabi=vfp ;;
> +            *) check_ld <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
>  __asm__ (".eabi_attribute 28, 1");
>  int main(void) { return 0; }
>  EOF
> +        esac
> +        warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
> +    fi
>  
>      # We have to check if pld is a nop and disable it.
>      check_asm pld '"pld [r0]"'

ok

Janne



More information about the ffmpeg-devel mailing list