aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-08 13:57:19 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-08 13:57:29 +0100
commit840a002b69406dd486842b29006b41dda8887fa9 (patch)
tree153b9e164d342be057ea05639490e2d30f6d3be3
parent7181806dc18062c5d1da760dcfdfbb99893b91cd (diff)
parent1234c66a315b139339d52ca193b3f1d67af9ce19 (diff)
downloadffmpeg-840a002b69406dd486842b29006b41dda8887fa9.tar.gz
Merge commit '1234c66a315b139339d52ca193b3f1d67af9ce19'
* commit '1234c66a315b139339d52ca193b3f1d67af9ce19': configure: arm: detect toolchain default arch version Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rwxr-xr-xconfigure32
1 files changed, 32 insertions, 0 deletions
diff --git a/configure b/configure
index 3d400ec82b..96555a5b3e 100755
--- a/configure
+++ b/configure
@@ -2823,6 +2823,37 @@ elif enabled alpha; then
elif enabled arm; then
+ check_arm_arch() {
+ check_cpp_condition stddef.h \
+ "defined __ARM_ARCH_${1}__ || defined __TARGET_ARCH_${2:-$1}" \
+ $cpuflags
+ }
+
+ probe_arm_arch() {
+ if check_arm_arch 4; then echo armv4;
+ elif check_arm_arch 4T; then echo armv4t;
+ elif check_arm_arch 5; then echo armv5;
+ elif check_arm_arch 5E; then echo armv5e;
+ elif check_arm_arch 5T; then echo armv5t;
+ elif check_arm_arch 5TE; then echo armv5te;
+ elif check_arm_arch 5TEJ; then echo armv5te;
+ elif check_arm_arch 6; then echo armv6;
+ elif check_arm_arch 6J; then echo armv6j;
+ elif check_arm_arch 6K; then echo armv6k;
+ elif check_arm_arch 6Z; then echo armv6z;
+ elif check_arm_arch 6ZK; then echo armv6zk;
+ elif check_arm_arch 6T2; then echo armv6t2;
+ elif check_arm_arch 7; then echo armv7;
+ elif check_arm_arch 7A 7_A; then echo armv7-a;
+ elif check_arm_arch 7R 7_R; then echo armv7-r;
+ elif check_arm_arch 7M 7_M; then echo armv7-m;
+ elif check_arm_arch 7EM 7E_M; then echo armv7-m;
+ elif check_arm_arch 8A 8_A; then echo armv8-a;
+ fi
+ }
+
+ [ "$cpu" = generic ] && cpu=$(probe_arm_arch)
+
case $cpu in
armv*)
cpuflags="-march=$cpu"
@@ -2837,6 +2868,7 @@ elif enabled arm; then
arm11*) subarch=armv6 ;;
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
+ *) subarch=$(probe_arm_arch) ;;
esac
;;
esac