OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 ## | 2 ## |
3 ## configure.sh | 3 ## configure.sh |
4 ## | 4 ## |
5 ## This script is sourced by the main configure script and contains | 5 ## This script is sourced by the main configure script and contains |
6 ## utility functions and other common bits that aren't strictly libvpx | 6 ## utility functions and other common bits that aren't strictly libvpx |
7 ## related. | 7 ## related. |
8 ## | 8 ## |
9 ## This build system is based in part on the FFmpeg configure script. | 9 ## This build system is based in part on the FFmpeg configure script. |
10 ## | 10 ## |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 # Process ARM architecture variants | 798 # Process ARM architecture variants |
799 case ${toolchain} in | 799 case ${toolchain} in |
800 arm*) | 800 arm*) |
801 # on arm, isa versions are supersets | 801 # on arm, isa versions are supersets |
802 case ${tgt_isa} in | 802 case ${tgt_isa} in |
803 arm64|armv8) | 803 arm64|armv8) |
804 soft_enable neon | 804 soft_enable neon |
805 ;; | 805 ;; |
806 armv7|armv7s) | 806 armv7|armv7s) |
807 soft_enable neon | 807 soft_enable neon |
808 soft_enable neon_asm | 808 # Only enable neon_asm when neon is also enabled. |
| 809 enabled neon && soft_enable neon_asm |
| 810 # If someone tries to force it through, die. |
| 811 if disabled neon && enabled neon_asm; then |
| 812 die "Disabling neon while keeping neon-asm is not supported" |
| 813 fi |
809 soft_enable media | 814 soft_enable media |
810 soft_enable fast_unaligned | 815 soft_enable fast_unaligned |
811 ;; | 816 ;; |
812 armv6) | 817 armv6) |
813 soft_enable media | 818 soft_enable media |
814 soft_enable fast_unaligned | 819 soft_enable fast_unaligned |
815 ;; | 820 ;; |
816 esac | 821 esac |
817 | 822 |
818 asm_conversion_cmd="cat" | 823 asm_conversion_cmd="cat" |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 soft_disable avx | 1116 soft_disable avx |
1112 soft_disable avx2 | 1117 soft_disable avx2 |
1113 ;; | 1118 ;; |
1114 esac | 1119 esac |
1115 ;; | 1120 ;; |
1116 esac | 1121 esac |
1117 | 1122 |
1118 bits=32 | 1123 bits=32 |
1119 enabled x86_64 && bits=64 | 1124 enabled x86_64 && bits=64 |
1120 check_cpp <<EOF && bits=x32 | 1125 check_cpp <<EOF && bits=x32 |
1121 #ifndef __ILP32__ | 1126 #if !defined(__ILP32__) || !defined(__x86_64__) |
1122 #error "not x32" | 1127 #error "not x32" |
1123 #endif | 1128 #endif |
1124 EOF | 1129 EOF |
1125 case ${tgt_cc} in | 1130 case ${tgt_cc} in |
1126 gcc*) | 1131 gcc*) |
1127 add_cflags -m${bits} | 1132 add_cflags -m${bits} |
1128 add_ldflags -m${bits} | 1133 add_ldflags -m${bits} |
1129 ;; | 1134 ;; |
1130 esac | 1135 esac |
1131 | 1136 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 check_cc <<EOF | 1265 check_cc <<EOF |
1261 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; | 1266 unsigned int e = 'O'<<24 | '2'<<16 | 'B'<<8 | 'E'; |
1262 EOF | 1267 EOF |
1263 [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | | 1268 [ -f "${TMP_O}" ] && od -A n -t x1 "${TMP_O}" | tr -d '\n' | |
1264 grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian | 1269 grep '4f *32 *42 *45' >/dev/null 2>&1 && enable_feature big_endian |
1265 | 1270 |
1266 # Try to find which inline keywords are supported | 1271 # Try to find which inline keywords are supported |
1267 check_cc <<EOF && INLINE="inline" | 1272 check_cc <<EOF && INLINE="inline" |
1268 static inline function() {} | 1273 static inline function() {} |
1269 EOF | 1274 EOF |
1270 check_cc <<EOF && INLINE="__inline__ __attribute__((always_inline))" | |
1271 static __attribute__((always_inline)) function() {} | |
1272 EOF | |
1273 | 1275 |
1274 # Almost every platform uses pthreads. | 1276 # Almost every platform uses pthreads. |
1275 if enabled multithread; then | 1277 if enabled multithread; then |
1276 case ${toolchain} in | 1278 case ${toolchain} in |
1277 *-win*-vs*) | 1279 *-win*-vs*) |
1278 ;; | 1280 ;; |
1279 *-android-gcc) | 1281 *-android-gcc) |
1280 ;; | 1282 ;; |
1281 *) | 1283 *) |
1282 check_header pthread.h && add_extralibs -lpthread | 1284 check_header pthread.h && add_extralibs -lpthread |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 # Prepare the PWD for building. | 1403 # Prepare the PWD for building. |
1402 for f in ${OOT_INSTALLS}; do | 1404 for f in ${OOT_INSTALLS}; do |
1403 install -D "${source_path}/$f" "$f" | 1405 install -D "${source_path}/$f" "$f" |
1404 done | 1406 done |
1405 fi | 1407 fi |
1406 cp "${source_path}/build/make/Makefile" . | 1408 cp "${source_path}/build/make/Makefile" . |
1407 | 1409 |
1408 clean_temp_files | 1410 clean_temp_files |
1409 true | 1411 true |
1410 } | 1412 } |
OLD | NEW |