diff options
author | Mans Rullgard <mans@mansr.com> | 2011-01-16 18:42:36 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-01-18 20:48:25 +0000 |
commit | 44caaa560b8527acba99bc493040600add0fdb74 (patch) | |
tree | 8021a4ccc3e0bdc2e301def6a3e4951128527c6d | |
parent | b0c1b66a4bd2a3f55bde2a03334809504178918a (diff) | |
download | ffmpeg-44caaa560b8527acba99bc493040600add0fdb74.tar.gz |
ARM: improve VFP ABI check
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.
-rwxr-xr-x | configure | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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]"' |