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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 add_ldflags "-mmacosx-version-min=10.7" | 767 add_ldflags "-mmacosx-version-min=10.7" |
768 ;; | 768 ;; |
769 *-darwin12-*) | 769 *-darwin12-*) |
770 add_cflags "-mmacosx-version-min=10.8" | 770 add_cflags "-mmacosx-version-min=10.8" |
771 add_ldflags "-mmacosx-version-min=10.8" | 771 add_ldflags "-mmacosx-version-min=10.8" |
772 ;; | 772 ;; |
773 *-darwin13-*) | 773 *-darwin13-*) |
774 add_cflags "-mmacosx-version-min=10.9" | 774 add_cflags "-mmacosx-version-min=10.9" |
775 add_ldflags "-mmacosx-version-min=10.9" | 775 add_ldflags "-mmacosx-version-min=10.9" |
776 ;; | 776 ;; |
| 777 *-iphonesimulator-*) |
| 778 add_cflags "-miphoneos-version-min=5.0" |
| 779 add_ldflags "-miphoneos-version-min=5.0" |
| 780 osx_sdk_dir="$(xcrun --sdk iphonesimulator --show-sdk-path)" |
| 781 add_cflags "-isysroot ${osx_sdk_dir}" |
| 782 add_ldflags "-isysroot ${osx_sdk_dir}" |
| 783 ;; |
777 esac | 784 esac |
778 | 785 |
779 # Handle Solaris variants. Solaris 10 needs -lposix4 | 786 # Handle Solaris variants. Solaris 10 needs -lposix4 |
780 case ${toolchain} in | 787 case ${toolchain} in |
781 sparc-solaris-*) | 788 sparc-solaris-*) |
782 add_extralibs -lposix4 | 789 add_extralibs -lposix4 |
783 disable_feature fast_unaligned | 790 disable_feature fast_unaligned |
784 ;; | 791 ;; |
785 *-solaris-*) | 792 *-solaris-*) |
786 add_extralibs -lposix4 | 793 add_extralibs -lposix4 |
787 ;; | 794 ;; |
788 esac | 795 esac |
789 | 796 |
790 # Process ARM architecture variants | 797 # Process ARM architecture variants |
791 case ${toolchain} in | 798 case ${toolchain} in |
792 arm*) | 799 arm*) |
793 # on arm, isa versions are supersets | 800 # on arm, isa versions are supersets |
794 case ${tgt_isa} in | 801 case ${tgt_isa} in |
795 armv8) | 802 armv8) |
796 soft_enable neon | 803 soft_enable neon |
797 ;; | 804 ;; |
798 armv7) | 805 armv7|armv7s) |
799 soft_enable neon | 806 soft_enable neon |
800 soft_enable neon_asm | 807 soft_enable neon_asm |
801 soft_enable media | 808 soft_enable media |
802 soft_enable edsp | 809 soft_enable edsp |
803 soft_enable fast_unaligned | 810 soft_enable fast_unaligned |
804 ;; | 811 ;; |
805 armv6) | 812 armv6) |
806 soft_enable media | 813 soft_enable media |
807 soft_enable edsp | 814 soft_enable edsp |
808 soft_enable fast_unaligned | 815 soft_enable fast_unaligned |
809 ;; | 816 ;; |
810 armv5te) | 817 armv5te) |
811 soft_enable edsp | 818 soft_enable edsp |
812 disable_feature fast_unaligned | 819 disable_feature fast_unaligned |
813 ;; | 820 ;; |
814 esac | 821 esac |
815 | 822 |
816 asm_conversion_cmd="cat" | 823 asm_conversion_cmd="cat" |
817 | 824 |
818 case ${tgt_cc} in | 825 case ${tgt_cc} in |
819 gcc) | 826 gcc) |
820 CROSS=${CROSS:-arm-none-linux-gnueabi-} | 827 CROSS=${CROSS:-arm-none-linux-gnueabi-} |
821 link_with_cc=gcc | 828 link_with_cc=gcc |
822 setup_gnu_toolchain | 829 setup_gnu_toolchain |
823 arch_int=${tgt_isa##armv} | 830 arch_int=${tgt_isa##armv} |
824 arch_int=${arch_int%%te} | 831 arch_int=${arch_int%%te} |
825 check_add_asflags --defsym ARCHITECTURE=${arch_int} | 832 check_add_asflags --defsym ARCHITECTURE=${arch_int} |
826 tune_cflags="-mtune=" | 833 tune_cflags="-mtune=" |
827 if [ ${tgt_isa} = "armv7" ]; then | 834 if [ ${tgt_isa} = "armv7" ] || [ ${tgt_isa} = "armv7s" ]; then |
828 if [ -z "${float_abi}" ]; then | 835 if [ -z "${float_abi}" ]; then |
829 check_cpp <<EOF && float_abi=hard || float_abi=softfp | 836 check_cpp <<EOF && float_abi=hard || float_abi=softfp |
830 #ifndef __ARM_PCS_VFP | 837 #ifndef __ARM_PCS_VFP |
831 #error "not hardfp" | 838 #error "not hardfp" |
832 #endif | 839 #endif |
833 EOF | 840 EOF |
834 fi | 841 fi |
835 check_add_cflags -march=armv7-a -mfloat-abi=${float_abi} | 842 check_add_cflags -march=armv7-a -mfloat-abi=${float_abi} |
836 check_add_asflags -march=armv7-a -mfloat-abi=${float_abi} | 843 check_add_asflags -march=armv7-a -mfloat-abi=${float_abi} |
837 | 844 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 add_asflags -f macho${bits} | 1164 add_asflags -f macho${bits} |
1158 enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x8
6_64" | 1165 enabled x86 && darwin_arch="-arch i386" || darwin_arch="-arch x8
6_64" |
1159 add_cflags ${darwin_arch} | 1166 add_cflags ${darwin_arch} |
1160 add_ldflags ${darwin_arch} | 1167 add_ldflags ${darwin_arch} |
1161 # -mdynamic-no-pic is still a bit of voodoo -- it was required a
t | 1168 # -mdynamic-no-pic is still a bit of voodoo -- it was required a
t |
1162 # one time, but does not seem to be now, and it breaks some of t
he | 1169 # one time, but does not seem to be now, and it breaks some of t
he |
1163 # code that still relies on inline assembly. | 1170 # code that still relies on inline assembly. |
1164 # enabled icc && ! enabled pic && add_cflags -fno-pic -mdynamic-
no-pic | 1171 # enabled icc && ! enabled pic && add_cflags -fno-pic -mdynamic-
no-pic |
1165 enabled icc && ! enabled pic && add_cflags -fno-pic | 1172 enabled icc && ! enabled pic && add_cflags -fno-pic |
1166 ;; | 1173 ;; |
| 1174 iphonesimulator) |
| 1175 add_asflags -f macho${bits} |
| 1176 enabled x86 && sim_arch="-arch i386" || sim_arch="-arch x86_64" |
| 1177 add_cflags ${sim_arch} |
| 1178 add_ldflags ${sim_arch} |
| 1179 ;; |
1167 os2) | 1180 os2) |
1168 add_asflags -f aout | 1181 add_asflags -f aout |
1169 enabled debug && add_asflags -g | 1182 enabled debug && add_asflags -g |
1170 EXE_SFX=.exe | 1183 EXE_SFX=.exe |
1171 ;; | 1184 ;; |
1172 *) log "Warning: Unknown os $tgt_os while setting up $AS flags" | 1185 *) log "Warning: Unknown os $tgt_os while setting up $AS flags" |
1173 ;; | 1186 ;; |
1174 esac | 1187 esac |
1175 ;; | 1188 ;; |
1176 universal*|*-gcc|generic-gnu) | 1189 universal*|*-gcc|generic-gnu) |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 | 1290 |
1278 process_toolchain() { | 1291 process_toolchain() { |
1279 process_common_toolchain | 1292 process_common_toolchain |
1280 } | 1293 } |
1281 | 1294 |
1282 print_config_mk() { | 1295 print_config_mk() { |
1283 local prefix=$1 | 1296 local prefix=$1 |
1284 local makefile=$2 | 1297 local makefile=$2 |
1285 shift 2 | 1298 shift 2 |
1286 for cfg; do | 1299 for cfg; do |
1287 upname="`toupper $cfg`" | |
1288 if enabled $cfg; then | 1300 if enabled $cfg; then |
| 1301 upname="`toupper $cfg`" |
1289 echo "${prefix}_${upname}=yes" >> $makefile | 1302 echo "${prefix}_${upname}=yes" >> $makefile |
1290 fi | 1303 fi |
1291 done | 1304 done |
1292 } | 1305 } |
1293 | 1306 |
1294 print_config_h() { | 1307 print_config_h() { |
1295 local prefix=$1 | 1308 local prefix=$1 |
1296 local header=$2 | 1309 local header=$2 |
1297 shift 2 | 1310 shift 2 |
1298 for cfg; do | 1311 for cfg; do |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 # Prepare the PWD for building. | 1364 # Prepare the PWD for building. |
1352 for f in ${OOT_INSTALLS}; do | 1365 for f in ${OOT_INSTALLS}; do |
1353 install -D "${source_path}/$f" "$f" | 1366 install -D "${source_path}/$f" "$f" |
1354 done | 1367 done |
1355 fi | 1368 fi |
1356 cp "${source_path}/build/make/Makefile" . | 1369 cp "${source_path}/build/make/Makefile" . |
1357 | 1370 |
1358 clean_temp_files | 1371 clean_temp_files |
1359 true | 1372 true |
1360 } | 1373 } |
OLD | NEW |