| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 ${toggle_extra_warnings} emit harmless warnings (always non-fatal) | 76 ${toggle_extra_warnings} emit harmless warnings (always non-fatal) |
| 77 ${toggle_werror} treat warnings as errors, if possible | 77 ${toggle_werror} treat warnings as errors, if possible |
| 78 (not available with all compilers) | 78 (not available with all compilers) |
| 79 ${toggle_optimizations} turn on/off compiler optimization flags | 79 ${toggle_optimizations} turn on/off compiler optimization flags |
| 80 ${toggle_pic} turn on/off Position Independent Code | 80 ${toggle_pic} turn on/off Position Independent Code |
| 81 ${toggle_ccache} turn on/off compiler cache | 81 ${toggle_ccache} turn on/off compiler cache |
| 82 ${toggle_debug} enable/disable debug mode | 82 ${toggle_debug} enable/disable debug mode |
| 83 ${toggle_gprof} enable/disable gprof profiling instrumentation | 83 ${toggle_gprof} enable/disable gprof profiling instrumentation |
| 84 ${toggle_gcov} enable/disable gcov coverage instrumentation | 84 ${toggle_gcov} enable/disable gcov coverage instrumentation |
| 85 ${toggle_thumb} enable/disable building arm assembly in thumb mode | 85 ${toggle_thumb} enable/disable building arm assembly in thumb mode |
| 86 ${toggle_dependency_tracking} |
| 87 disable to speed up one-time build |
| 86 | 88 |
| 87 Install options: | 89 Install options: |
| 88 ${toggle_install_docs} control whether docs are installed | 90 ${toggle_install_docs} control whether docs are installed |
| 89 ${toggle_install_bins} control whether binaries are installed | 91 ${toggle_install_bins} control whether binaries are installed |
| 90 ${toggle_install_libs} control whether libraries are installed | 92 ${toggle_install_libs} control whether libraries are installed |
| 91 ${toggle_install_srcs} control whether sources are installed | 93 ${toggle_install_srcs} control whether sources are installed |
| 92 | 94 |
| 93 | 95 |
| 94 EOF | 96 EOF |
| 95 } | 97 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 eval test "x\$$1" = "xyes" | 196 eval test "x\$$1" = "xyes" |
| 195 } | 197 } |
| 196 | 198 |
| 197 disabled(){ | 199 disabled(){ |
| 198 eval test "x\$$1" = "xno" | 200 eval test "x\$$1" = "xno" |
| 199 } | 201 } |
| 200 | 202 |
| 201 soft_enable() { | 203 soft_enable() { |
| 202 for var in $*; do | 204 for var in $*; do |
| 203 if ! disabled $var; then | 205 if ! disabled $var; then |
| 204 log_echo " enabling $var" | 206 enabled $var || log_echo " enabling $var" |
| 205 enable_feature $var | 207 enable_feature $var |
| 206 fi | 208 fi |
| 207 done | 209 done |
| 208 } | 210 } |
| 209 | 211 |
| 210 soft_disable() { | 212 soft_disable() { |
| 211 for var in $*; do | 213 for var in $*; do |
| 212 if ! enabled $var; then | 214 if ! enabled $var; then |
| 213 log_echo " disabling $var" | 215 disabled $var || log_echo " disabling $var" |
| 214 disable_feature $var | 216 disable_feature $var |
| 215 fi | 217 fi |
| 216 done | 218 done |
| 217 } | 219 } |
| 218 | 220 |
| 219 # | 221 # |
| 220 # Text Processing Functions | 222 # Text Processing Functions |
| 221 # | 223 # |
| 222 toupper(){ | 224 toupper(){ |
| 223 echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | 225 echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 --extra-cflags=*) | 503 --extra-cflags=*) |
| 502 extra_cflags="${optval}" | 504 extra_cflags="${optval}" |
| 503 ;; | 505 ;; |
| 504 --enable-?*|--disable-?*) | 506 --enable-?*|--disable-?*) |
| 505 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` | 507 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` |
| 506 if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then | 508 if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then |
| 507 [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${op
tion} " | 509 [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${op
tion} " |
| 508 elif [ $action = "disable" ] && ! disabled $option ; then | 510 elif [ $action = "disable" ] && ! disabled $option ; then |
| 509 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || | 511 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || |
| 510 die_unknown $opt | 512 die_unknown $opt |
| 513 log_echo " disabling $option" |
| 511 elif [ $action = "enable" ] && ! enabled $option ; then | 514 elif [ $action = "enable" ] && ! enabled $option ; then |
| 512 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || | 515 echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null || |
| 513 die_unknown $opt | 516 die_unknown $opt |
| 517 log_echo " enabling $option" |
| 514 fi | 518 fi |
| 515 ${action}_feature $option | 519 ${action}_feature $option |
| 516 ;; | 520 ;; |
| 517 --require-?*) | 521 --require-?*) |
| 518 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` | 522 eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` |
| 519 if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then | 523 if echo "${ARCH_EXT_LIST}" none | grep "^ *$option\$" >/dev/null; then |
| 520 RTCD_OPTIONS="${RTCD_OPTIONS}${opt} " | 524 RTCD_OPTIONS="${RTCD_OPTIONS}${opt} " |
| 521 else | 525 else |
| 522 die_unknown $opt | 526 die_unknown $opt |
| 523 fi | 527 fi |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 CXX=${CXX:-${CROSS}g++} | 603 CXX=${CXX:-${CROSS}g++} |
| 600 AR=${AR:-${CROSS}ar} | 604 AR=${AR:-${CROSS}ar} |
| 601 LD=${LD:-${CROSS}${link_with_cc:-ld}} | 605 LD=${LD:-${CROSS}${link_with_cc:-ld}} |
| 602 AS=${AS:-${CROSS}as} | 606 AS=${AS:-${CROSS}as} |
| 603 STRIP=${STRIP:-${CROSS}strip} | 607 STRIP=${STRIP:-${CROSS}strip} |
| 604 NM=${NM:-${CROSS}nm} | 608 NM=${NM:-${CROSS}nm} |
| 605 AS_SFX=.s | 609 AS_SFX=.s |
| 606 EXE_SFX= | 610 EXE_SFX= |
| 607 } | 611 } |
| 608 | 612 |
| 613 # Reliably find the newest available Darwin SDKs. (Older versions of |
| 614 # xcrun don't support --show-sdk-path.) |
| 615 show_darwin_sdk_path() { |
| 616 xcrun --sdk $1 --show-sdk-path 2>/dev/null || |
| 617 xcodebuild -sdk $1 -version Path 2>/dev/null |
| 618 } |
| 619 |
| 609 process_common_toolchain() { | 620 process_common_toolchain() { |
| 610 if [ -z "$toolchain" ]; then | 621 if [ -z "$toolchain" ]; then |
| 611 gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}" | 622 gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}" |
| 612 | 623 |
| 613 # detect tgt_isa | 624 # detect tgt_isa |
| 614 case "$gcctarget" in | 625 case "$gcctarget" in |
| 615 armv6*) | 626 armv6*) |
| 616 tgt_isa=armv6 | 627 tgt_isa=armv6 |
| 617 ;; | 628 ;; |
| 618 armv7*-hardfloat*) | 629 armv7*-hardfloat*) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 659 tgt_os=darwin11 | 670 tgt_os=darwin11 |
| 660 ;; | 671 ;; |
| 661 *darwin12*) | 672 *darwin12*) |
| 662 tgt_isa=x86_64 | 673 tgt_isa=x86_64 |
| 663 tgt_os=darwin12 | 674 tgt_os=darwin12 |
| 664 ;; | 675 ;; |
| 665 *darwin13*) | 676 *darwin13*) |
| 666 tgt_isa=x86_64 | 677 tgt_isa=x86_64 |
| 667 tgt_os=darwin13 | 678 tgt_os=darwin13 |
| 668 ;; | 679 ;; |
| 680 *darwin14*) |
| 681 tgt_isa=x86_64 |
| 682 tgt_os=darwin14 |
| 683 ;; |
| 669 x86_64*mingw32*) | 684 x86_64*mingw32*) |
| 670 tgt_os=win64 | 685 tgt_os=win64 |
| 671 ;; | 686 ;; |
| 672 *mingw32*|*cygwin*) | 687 *mingw32*|*cygwin*) |
| 673 [ -z "$tgt_isa" ] && tgt_isa=x86 | 688 [ -z "$tgt_isa" ] && tgt_isa=x86 |
| 674 tgt_os=win32 | 689 tgt_os=win32 |
| 675 ;; | 690 ;; |
| 676 *linux*|*bsd*) | 691 *linux*|*bsd*) |
| 677 tgt_os=linux | 692 tgt_os=linux |
| 678 ;; | 693 ;; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 ;; | 733 ;; |
| 719 esac | 734 esac |
| 720 | 735 |
| 721 # PIC is probably what we want when building shared libs | 736 # PIC is probably what we want when building shared libs |
| 722 enabled shared && soft_enable pic | 737 enabled shared && soft_enable pic |
| 723 | 738 |
| 724 # Minimum iOS version for all target platforms (darwin and iphonesimulator). | 739 # Minimum iOS version for all target platforms (darwin and iphonesimulator). |
| 725 IOS_VERSION_MIN="6.0" | 740 IOS_VERSION_MIN="6.0" |
| 726 | 741 |
| 727 # Handle darwin variants. Newer SDKs allow targeting older | 742 # Handle darwin variants. Newer SDKs allow targeting older |
| 728 # platforms, so find the newest SDK available. | 743 # platforms, so use the newest one available. |
| 729 case ${toolchain} in | 744 case ${toolchain} in |
| 730 *-darwin*) | 745 *-darwin*) |
| 731 if [ -z "${DEVELOPER_DIR}" ]; then | 746 osx_sdk_dir="$(show_darwin_sdk_path macosx)" |
| 732 DEVELOPER_DIR=`xcode-select -print-path 2> /dev/null` | 747 if [ -d "${osx_sdk_dir}" ]; then |
| 733 [ $? -ne 0 ] && OSX_SKIP_DIR_CHECK=1 | 748 add_cflags "-isysroot ${osx_sdk_dir}" |
| 734 fi | 749 add_ldflags "-isysroot ${osx_sdk_dir}" |
| 735 if [ -z "${OSX_SKIP_DIR_CHECK}" ]; then | |
| 736 OSX_SDK_ROOTS="${DEVELOPER_DIR}/SDKs" | |
| 737 OSX_SDK_VERSIONS="MacOSX10.4u.sdk MacOSX10.5.sdk MacOSX10.6.sdk" | |
| 738 OSX_SDK_VERSIONS="${OSX_SDK_VERSIONS} MacOSX10.7.sdk" | |
| 739 for v in ${OSX_SDK_VERSIONS}; do | |
| 740 if [ -d "${OSX_SDK_ROOTS}/${v}" ]; then | |
| 741 osx_sdk_dir="${OSX_SDK_ROOTS}/${v}" | |
| 742 fi | |
| 743 done | |
| 744 fi | 750 fi |
| 745 ;; | 751 ;; |
| 746 esac | 752 esac |
| 747 | 753 |
| 748 if [ -d "${osx_sdk_dir}" ]; then | |
| 749 add_cflags "-isysroot ${osx_sdk_dir}" | |
| 750 add_ldflags "-isysroot ${osx_sdk_dir}" | |
| 751 fi | |
| 752 | |
| 753 case ${toolchain} in | 754 case ${toolchain} in |
| 754 *-darwin8-*) | 755 *-darwin8-*) |
| 755 add_cflags "-mmacosx-version-min=10.4" | 756 add_cflags "-mmacosx-version-min=10.4" |
| 756 add_ldflags "-mmacosx-version-min=10.4" | 757 add_ldflags "-mmacosx-version-min=10.4" |
| 757 ;; | 758 ;; |
| 758 *-darwin9-*) | 759 *-darwin9-*) |
| 759 add_cflags "-mmacosx-version-min=10.5" | 760 add_cflags "-mmacosx-version-min=10.5" |
| 760 add_ldflags "-mmacosx-version-min=10.5" | 761 add_ldflags "-mmacosx-version-min=10.5" |
| 761 ;; | 762 ;; |
| 762 *-darwin10-*) | 763 *-darwin10-*) |
| 763 add_cflags "-mmacosx-version-min=10.6" | 764 add_cflags "-mmacosx-version-min=10.6" |
| 764 add_ldflags "-mmacosx-version-min=10.6" | 765 add_ldflags "-mmacosx-version-min=10.6" |
| 765 ;; | 766 ;; |
| 766 *-darwin11-*) | 767 *-darwin11-*) |
| 767 add_cflags "-mmacosx-version-min=10.7" | 768 add_cflags "-mmacosx-version-min=10.7" |
| 768 add_ldflags "-mmacosx-version-min=10.7" | 769 add_ldflags "-mmacosx-version-min=10.7" |
| 769 ;; | 770 ;; |
| 770 *-darwin12-*) | 771 *-darwin12-*) |
| 771 add_cflags "-mmacosx-version-min=10.8" | 772 add_cflags "-mmacosx-version-min=10.8" |
| 772 add_ldflags "-mmacosx-version-min=10.8" | 773 add_ldflags "-mmacosx-version-min=10.8" |
| 773 ;; | 774 ;; |
| 774 *-darwin13-*) | 775 *-darwin13-*) |
| 775 add_cflags "-mmacosx-version-min=10.9" | 776 add_cflags "-mmacosx-version-min=10.9" |
| 776 add_ldflags "-mmacosx-version-min=10.9" | 777 add_ldflags "-mmacosx-version-min=10.9" |
| 777 ;; | 778 ;; |
| 779 *-darwin14-*) |
| 780 add_cflags "-mmacosx-version-min=10.10" |
| 781 add_ldflags "-mmacosx-version-min=10.10" |
| 782 ;; |
| 778 *-iphonesimulator-*) | 783 *-iphonesimulator-*) |
| 779 add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" | 784 add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
| 780 add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" | 785 add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
| 781 osx_sdk_dir="$(xcrun --sdk iphonesimulator --show-sdk-path)" | 786 iossim_sdk_dir="$(show_darwin_sdk_path iphonesimulator)" |
| 782 add_cflags "-isysroot ${osx_sdk_dir}" | 787 if [ -d "${iossim_sdk_dir}" ]; then |
| 783 add_ldflags "-isysroot ${osx_sdk_dir}" | 788 add_cflags "-isysroot ${iossim_sdk_dir}" |
| 789 add_ldflags "-isysroot ${iossim_sdk_dir}" |
| 790 fi |
| 784 ;; | 791 ;; |
| 785 esac | 792 esac |
| 786 | 793 |
| 787 # Handle Solaris variants. Solaris 10 needs -lposix4 | 794 # Handle Solaris variants. Solaris 10 needs -lposix4 |
| 788 case ${toolchain} in | 795 case ${toolchain} in |
| 789 sparc-solaris-*) | 796 sparc-solaris-*) |
| 790 add_extralibs -lposix4 | 797 add_extralibs -lposix4 |
| 791 disable_feature fast_unaligned | 798 disable_feature fast_unaligned |
| 792 ;; | 799 ;; |
| 793 *-solaris-*) | 800 *-solaris-*) |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 soft_enable realtime_only | 952 soft_enable realtime_only |
| 946 if [ ${tgt_isa} = "armv7" ]; then | 953 if [ ${tgt_isa} = "armv7" ]; then |
| 947 soft_enable runtime_cpu_detect | 954 soft_enable runtime_cpu_detect |
| 948 fi | 955 fi |
| 949 if enabled runtime_cpu_detect; then | 956 if enabled runtime_cpu_detect; then |
| 950 add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" | 957 add_cflags "-I${SDK_PATH}/sources/android/cpufeatures" |
| 951 fi | 958 fi |
| 952 ;; | 959 ;; |
| 953 | 960 |
| 954 darwin*) | 961 darwin*) |
| 955 XCRUN_FIND="xcrun --sdk iphoneos -find" | 962 XCRUN_FIND="xcrun --sdk iphoneos --find" |
| 956 CXX="$(${XCRUN_FIND} clang++)" | 963 CXX="$(${XCRUN_FIND} clang++)" |
| 957 CC="$(${XCRUN_FIND} clang)" | 964 CC="$(${XCRUN_FIND} clang)" |
| 958 AR="$(${XCRUN_FIND} ar)" | 965 AR="$(${XCRUN_FIND} ar)" |
| 959 AS="$(${XCRUN_FIND} as)" | 966 AS="$(${XCRUN_FIND} as)" |
| 960 STRIP="$(${XCRUN_FIND} strip)" | 967 STRIP="$(${XCRUN_FIND} strip)" |
| 961 NM="$(${XCRUN_FIND} nm)" | 968 NM="$(${XCRUN_FIND} nm)" |
| 962 RANLIB="$(${XCRUN_FIND} ranlib)" | 969 RANLIB="$(${XCRUN_FIND} ranlib)" |
| 963 AS_SFX=.s | 970 AS_SFX=.s |
| 964 | 971 |
| 965 # Special handling of ld for armv6 because libclang_rt.ios.a does | 972 # Special handling of ld for armv6 because libclang_rt.ios.a does |
| 966 # not contain armv6 support in Apple's clang package: | 973 # not contain armv6 support in Apple's clang package: |
| 967 # Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn). | 974 # Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn). |
| 968 # TODO(tomfinegan): Remove this. Our minimum iOS version (6.0) | 975 # TODO(tomfinegan): Remove this. Our minimum iOS version (6.0) |
| 969 # renders support for armv6 unnecessary because the 3GS and up | 976 # renders support for armv6 unnecessary because the 3GS and up |
| 970 # support neon. | 977 # support neon. |
| 971 if [ "${tgt_isa}" = "armv6" ]; then | 978 if [ "${tgt_isa}" = "armv6" ]; then |
| 972 LD="$(${XCRUN_FIND} ld)" | 979 LD="$(${XCRUN_FIND} ld)" |
| 973 else | 980 else |
| 974 LD="${CXX:-$(${XCRUN_FIND} ld)}" | 981 LD="${CXX:-$(${XCRUN_FIND} ld)}" |
| 975 fi | 982 fi |
| 976 | 983 |
| 977 # ASFLAGS is written here instead of using check_add_asflags | 984 # ASFLAGS is written here instead of using check_add_asflags |
| 978 # because we need to overwrite all of ASFLAGS and purge the | 985 # because we need to overwrite all of ASFLAGS and purge the |
| 979 # options that were put in above | 986 # options that were put in above |
| 980 ASFLAGS="-arch ${tgt_isa} -g" | 987 ASFLAGS="-arch ${tgt_isa} -g" |
| 981 | 988 |
| 982 alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)" | 989 add_cflags -arch ${tgt_isa} |
| 983 add_cflags -arch ${tgt_isa} -isysroot ${alt_libc} | |
| 984 add_ldflags -arch ${tgt_isa} | 990 add_ldflags -arch ${tgt_isa} |
| 985 | 991 |
| 992 alt_libc="$(show_darwin_sdk_path iphoneos)" |
| 993 if [ -d "${alt_libc}" ]; then |
| 994 add_cflags -isysroot ${alt_libc} |
| 995 fi |
| 996 |
| 986 if [ "${LD}" = "${CXX}" ]; then | 997 if [ "${LD}" = "${CXX}" ]; then |
| 987 add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" | 998 add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" |
| 988 else | 999 else |
| 989 add_ldflags -ios_version_min "${IOS_VERSION_MIN}" | 1000 add_ldflags -ios_version_min "${IOS_VERSION_MIN}" |
| 990 fi | 1001 fi |
| 991 | 1002 |
| 992 for d in lib usr/lib usr/lib/system; do | 1003 for d in lib usr/lib usr/lib/system; do |
| 993 try_dir="${alt_libc}/${d}" | 1004 try_dir="${alt_libc}/${d}" |
| 994 [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" | 1005 [ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" |
| 995 done | 1006 done |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1143 check_gcc_machine_option sse3 | 1154 check_gcc_machine_option sse3 |
| 1144 check_gcc_machine_option ssse3 | 1155 check_gcc_machine_option ssse3 |
| 1145 check_gcc_machine_option sse4 sse4_1 | 1156 check_gcc_machine_option sse4 sse4_1 |
| 1146 check_gcc_machine_option avx | 1157 check_gcc_machine_option avx |
| 1147 check_gcc_machine_option avx2 | 1158 check_gcc_machine_option avx2 |
| 1148 | 1159 |
| 1149 case "${AS}" in | 1160 case "${AS}" in |
| 1150 auto|"") | 1161 auto|"") |
| 1151 which nasm >/dev/null 2>&1 && AS=nasm | 1162 which nasm >/dev/null 2>&1 && AS=nasm |
| 1152 which yasm >/dev/null 2>&1 && AS=yasm | 1163 which yasm >/dev/null 2>&1 && AS=yasm |
| 1164 if [ "${AS}" = nasm ] ; then |
| 1165 # Apple ships version 0.98 of nasm through at least Xcode 6. Revisit |
| 1166 # this check if they start shipping a compatible version. |
| 1167 apple=`nasm -v | grep "Apple"` |
| 1168 [ -n "${apple}" ] \ |
| 1169 && echo "Unsupported version of nasm: ${apple}" \ |
| 1170 && AS="" |
| 1171 fi |
| 1153 [ "${AS}" = auto ] || [ -z "${AS}" ] \ | 1172 [ "${AS}" = auto ] || [ -z "${AS}" ] \ |
| 1154 && die "Neither yasm nor nasm have been found" | 1173 && die "Neither yasm nor nasm have been found" |
| 1155 ;; | 1174 ;; |
| 1156 esac | 1175 esac |
| 1157 log_echo " using $AS" | 1176 log_echo " using $AS" |
| 1158 [ "${AS##*/}" = nasm ] && add_asflags -Ox | 1177 [ "${AS##*/}" = nasm ] && add_asflags -Ox |
| 1159 AS_SFX=.asm | 1178 AS_SFX=.asm |
| 1160 case ${tgt_os} in | 1179 case ${tgt_os} in |
| 1161 win32) | 1180 win32) |
| 1162 add_asflags -f win32 | 1181 add_asflags -f win32 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1235 check_add_ldflags -fprofile-arcs -ftest-coverage | 1254 check_add_ldflags -fprofile-arcs -ftest-coverage |
| 1236 | 1255 |
| 1237 if enabled optimizations; then | 1256 if enabled optimizations; then |
| 1238 if enabled rvct; then | 1257 if enabled rvct; then |
| 1239 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime | 1258 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime |
| 1240 else | 1259 else |
| 1241 enabled small && check_add_cflags -O2 || check_add_cflags -O3 | 1260 enabled small && check_add_cflags -O2 || check_add_cflags -O3 |
| 1242 fi | 1261 fi |
| 1243 fi | 1262 fi |
| 1244 | 1263 |
| 1245 tgt_os_no_version=$(echo "${tgt_os}" | tr -d "[0-9]") | 1264 if [ "${tgt_isa}" = "x86_64" ] || [ "${tgt_isa}" = "x86" ]; then |
| 1246 # Default use_x86inc to yes when we are 64 bit, non-pic, or on any | |
| 1247 # non-Darwin target. | |
| 1248 if [ "${tgt_isa}" = "x86_64" ] || [ "${pic}" != "yes" ] || \ | |
| 1249 [ "${tgt_os_no_version}" != "darwin" ]; then | |
| 1250 soft_enable use_x86inc | 1265 soft_enable use_x86inc |
| 1251 fi | 1266 fi |
| 1252 | 1267 |
| 1253 # Position Independent Code (PIC) support, for building relocatable | 1268 # Position Independent Code (PIC) support, for building relocatable |
| 1254 # shared objects | 1269 # shared objects |
| 1255 enabled gcc && enabled pic && check_add_cflags -fPIC | 1270 enabled gcc && enabled pic && check_add_cflags -fPIC |
| 1256 | 1271 |
| 1257 # Work around longjmp interception on glibc >= 2.11, to improve binary | 1272 # Work around longjmp interception on glibc >= 2.11, to improve binary |
| 1258 # compatibility. See http://code.google.com/p/webm/issues/detail?id=166 | 1273 # compatibility. See http://code.google.com/p/webm/issues/detail?id=166 |
| 1259 enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 | 1274 enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1403 # Prepare the PWD for building. | 1418 # Prepare the PWD for building. |
| 1404 for f in ${OOT_INSTALLS}; do | 1419 for f in ${OOT_INSTALLS}; do |
| 1405 install -D "${source_path}/$f" "$f" | 1420 install -D "${source_path}/$f" "$f" |
| 1406 done | 1421 done |
| 1407 fi | 1422 fi |
| 1408 cp "${source_path}/build/make/Makefile" . | 1423 cp "${source_path}/build/make/Makefile" . |
| 1409 | 1424 |
| 1410 clean_temp_files | 1425 clean_temp_files |
| 1411 true | 1426 true |
| 1412 } | 1427 } |
| OLD | NEW |