Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: source/libvpx/build/make/configure.sh

Issue 375983002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/README ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 781 matching lines...) Expand 10 before | Expand all | Expand 10 after
792 *-solaris-*) 792 *-solaris-*)
793 add_extralibs -lposix4 793 add_extralibs -lposix4
794 ;; 794 ;;
795 esac 795 esac
796 796
797 # Process ARM architecture variants 797 # Process ARM architecture variants
798 case ${toolchain} in 798 case ${toolchain} in
799 arm*) 799 arm*)
800 # on arm, isa versions are supersets 800 # on arm, isa versions are supersets
801 case ${tgt_isa} in 801 case ${tgt_isa} in
802 armv8) 802 arm64|armv8)
803 soft_enable neon 803 soft_enable neon
804 ;; 804 ;;
805 armv7|armv7s) 805 armv7|armv7s)
806 soft_enable neon 806 soft_enable neon
807 soft_enable neon_asm 807 soft_enable neon_asm
808 soft_enable media 808 soft_enable media
809 soft_enable edsp 809 soft_enable edsp
810 soft_enable fast_unaligned 810 soft_enable fast_unaligned
811 ;; 811 ;;
812 armv6) 812 armv6)
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 darwin_arch="-arch ppc" 1041 darwin_arch="-arch ppc"
1042 enabled ppc64 && darwin_arch="${darwin_arch}64" 1042 enabled ppc64 && darwin_arch="${darwin_arch}64"
1043 add_cflags ${darwin_arch} -m${bits} -fasm-blocks 1043 add_cflags ${darwin_arch} -m${bits} -fasm-blocks
1044 add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwi n" 1044 add_asflags ${darwin_arch} -force_cpusubtype_ALL -I"\$(dir \$<)darwi n"
1045 add_ldflags ${darwin_arch} -m${bits} 1045 add_ldflags ${darwin_arch} -m${bits}
1046 enabled altivec && add_cflags -faltivec 1046 enabled altivec && add_cflags -faltivec
1047 ;; 1047 ;;
1048 esac 1048 esac
1049 ;; 1049 ;;
1050 x86*) 1050 x86*)
1051 bits=32
1052 enabled x86_64 && bits=64
1053 check_cpp <<EOF && bits=x32
1054 #ifndef __ILP32__
1055 #error "not x32"
1056 #endif
1057 EOF
1058
1059 case ${tgt_os} in 1051 case ${tgt_os} in
1060 win*) 1052 win*)
1061 enabled gcc && add_cflags -fno-common 1053 enabled gcc && add_cflags -fno-common
1062 ;; 1054 ;;
1063 solaris*) 1055 solaris*)
1064 CC=${CC:-${CROSS}gcc} 1056 CC=${CC:-${CROSS}gcc}
1065 CXX=${CXX:-${CROSS}g++} 1057 CXX=${CXX:-${CROSS}g++}
1066 LD=${LD:-${CROSS}gcc} 1058 LD=${LD:-${CROSS}gcc}
1067 CROSS=${CROSS:-g} 1059 CROSS=${CROSS:-g}
1068 ;; 1060 ;;
(...skipping 18 matching lines...) Expand all
1087 atom*) 1079 atom*)
1088 tune_cflags="-x" 1080 tune_cflags="-x"
1089 tune_cpu="SSE3_ATOM" 1081 tune_cpu="SSE3_ATOM"
1090 ;; 1082 ;;
1091 *) 1083 *)
1092 tune_cflags="-march=" 1084 tune_cflags="-march="
1093 ;; 1085 ;;
1094 esac 1086 esac
1095 ;; 1087 ;;
1096 gcc*) 1088 gcc*)
1097 add_cflags -m${bits}
1098 add_ldflags -m${bits}
1099 link_with_cc=gcc 1089 link_with_cc=gcc
1100 tune_cflags="-march=" 1090 tune_cflags="-march="
1101 setup_gnu_toolchain 1091 setup_gnu_toolchain
1102 #for 32 bit x86 builds, -O3 did not turn on this flag 1092 #for 32 bit x86 builds, -O3 did not turn on this flag
1103 enabled optimizations && disabled gprof && check_add_cflags -fom it-frame-pointer 1093 enabled optimizations && disabled gprof && check_add_cflags -fom it-frame-pointer
1104 ;; 1094 ;;
1105 vs*) 1095 vs*)
1106 # When building with Microsoft Visual Studio the assembler is 1096 # When building with Microsoft Visual Studio the assembler is
1107 # invoked directly. Checking at configure time is unnecessary. 1097 # invoked directly. Checking at configure time is unnecessary.
1108 # Skip the check by setting AS arbitrarily 1098 # Skip the check by setting AS arbitrarily
1109 AS=msvs 1099 AS=msvs
1110 msvs_arch_dir=x86-msvs 1100 msvs_arch_dir=x86-msvs
1111 vc_version=${tgt_cc##vs} 1101 vc_version=${tgt_cc##vs}
1112 case $vc_version in 1102 case $vc_version in
1113 7|8|9|10) 1103 7|8|9|10)
1114 echo "${tgt_cc} does not support avx/avx2, disabling... .." 1104 echo "${tgt_cc} does not support avx/avx2, disabling... .."
1115 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx --disable-av x2 " 1105 RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx --disable-av x2 "
1116 soft_disable avx 1106 soft_disable avx
1117 soft_disable avx2 1107 soft_disable avx2
1118 ;; 1108 ;;
1119 esac 1109 esac
1120 ;; 1110 ;;
1121 esac 1111 esac
1122 1112
1113 bits=32
1114 enabled x86_64 && bits=64
1115 check_cpp <<EOF && bits=x32
1116 #ifndef __ILP32__
1117 #error "not x32"
1118 #endif
1119 EOF
1120 case ${tgt_cc} in
1121 gcc*)
1122 add_cflags -m${bits}
1123 add_ldflags -m${bits}
1124 ;;
1125 esac
1126
1123 soft_enable runtime_cpu_detect 1127 soft_enable runtime_cpu_detect
1124 # We can't use 'check_cflags' until the compiler is configured and CC is 1128 # We can't use 'check_cflags' until the compiler is configured and CC is
1125 # populated. 1129 # populated.
1126 check_gcc_machine_option mmx 1130 check_gcc_machine_option mmx
1127 check_gcc_machine_option sse 1131 check_gcc_machine_option sse
1128 check_gcc_machine_option sse2 1132 check_gcc_machine_option sse2
1129 check_gcc_machine_option sse3 1133 check_gcc_machine_option sse3
1130 check_gcc_machine_option ssse3 1134 check_gcc_machine_option ssse3
1131 check_gcc_machine_option sse4 sse4_1 1135 check_gcc_machine_option sse4 sse4_1
1132 check_gcc_machine_option avx 1136 check_gcc_machine_option avx
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 check_add_ldflags -fprofile-arcs -ftest-coverage 1219 check_add_ldflags -fprofile-arcs -ftest-coverage
1216 1220
1217 if enabled optimizations; then 1221 if enabled optimizations; then
1218 if enabled rvct; then 1222 if enabled rvct; then
1219 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime 1223 enabled small && check_add_cflags -Ospace || check_add_cflags -Otime
1220 else 1224 else
1221 enabled small && check_add_cflags -O2 || check_add_cflags -O3 1225 enabled small && check_add_cflags -O2 || check_add_cflags -O3
1222 fi 1226 fi
1223 fi 1227 fi
1224 1228
1225 # default use_x86inc to yes if pic is no or 64bit or we are not on darwin 1229 tgt_os_no_version=$(echo "${tgt_os}" | tr -d "[0-9]")
1226 if [ ${tgt_isa} = x86_64 -o ! "$pic" = "yes" -o \ 1230 # Default use_x86inc to yes when we are 64 bit, non-pic, or on any
1227 "${tgt_os#darwin}" = "${tgt_os}" ]; then 1231 # non-Darwin target.
1228 soft_enable use_x86inc 1232 if [ "${tgt_isa}" = "x86_64" ] || [ "${pic}" != "yes" ] || \
1233 [ "${tgt_os_no_version}" != "darwin" ]; then
1234 soft_enable use_x86inc
1229 fi 1235 fi
1230 1236
1231 # Position Independent Code (PIC) support, for building relocatable 1237 # Position Independent Code (PIC) support, for building relocatable
1232 # shared objects 1238 # shared objects
1233 enabled gcc && enabled pic && check_add_cflags -fPIC 1239 enabled gcc && enabled pic && check_add_cflags -fPIC
1234 1240
1235 # Work around longjmp interception on glibc >= 2.11, to improve binary 1241 # Work around longjmp interception on glibc >= 2.11, to improve binary
1236 # compatibility. See http://code.google.com/p/webm/issues/detail?id=166 1242 # compatibility. See http://code.google.com/p/webm/issues/detail?id=166
1237 enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 1243 enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
1238 1244
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1364 # Prepare the PWD for building. 1370 # Prepare the PWD for building.
1365 for f in ${OOT_INSTALLS}; do 1371 for f in ${OOT_INSTALLS}; do
1366 install -D "${source_path}/$f" "$f" 1372 install -D "${source_path}/$f" "$f"
1367 done 1373 done
1368 fi 1374 fi
1369 cp "${source_path}/build/make/Makefile" . 1375 cp "${source_path}/build/make/Makefile" .
1370 1376
1371 clean_temp_files 1377 clean_temp_files
1372 true 1378 true
1373 } 1379 }
OLDNEW
« no previous file with comments | « source/libvpx/README ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698