summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/libvpx/source/libvpx/build/make/configure.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/libvpx/source/libvpx/build/make/configure.sh')
-rwxr-xr-xchromium/third_party/libvpx/source/libvpx/build/make/configure.sh135
1 files changed, 70 insertions, 65 deletions
diff --git a/chromium/third_party/libvpx/source/libvpx/build/make/configure.sh b/chromium/third_party/libvpx/source/libvpx/build/make/configure.sh
index 83f480a4259..c07b049786e 100755
--- a/chromium/third_party/libvpx/source/libvpx/build/make/configure.sh
+++ b/chromium/third_party/libvpx/source/libvpx/build/make/configure.sh
@@ -41,7 +41,7 @@ log(){
log_file(){
log BEGIN $1
- pr -n -t $1 >>$logfile
+ cat -n $1 >>$logfile
log END $1
}
@@ -274,6 +274,7 @@ TMP_ASM="${TMPDIRx}/vpx-conf-$$-${RAND}.asm"
clean_temp_files() {
rm -f ${TMP_C} ${TMP_CC} ${TMP_H} ${TMP_O} ${TMP_X} ${TMP_ASM}
+ enabled gcov && rm -f ${TMP_C%.c}.gcno ${TMP_CC%.cc}.gcno
}
#
@@ -327,7 +328,7 @@ EOF
check_cflags() {
log check_cflags "$@"
- check_cc "$@" <<EOF
+ check_cc -Werror "$@" <<EOF
int x;
EOF
}
@@ -337,11 +338,11 @@ check_cxxflags() {
# Catch CFLAGS that trigger CXX warnings
case "$CXX" in
- *g++*) check_cxx -Werror "$@" <<EOF
+ *c++-analyzer|*clang++|*g++*) check_cxx -Werror "$@" <<EOF
int x;
EOF
;;
- *) check_cxx "$@" <<EOF
+ *) check_cxx -Werror "$@" <<EOF
int x;
EOF
;;
@@ -378,6 +379,19 @@ EOF
fi
}
+# tests for -m$1 toggling the feature given in $2. If $2 is empty $1 is used.
+check_gcc_machine_option() {
+ local opt="$1"
+ local feature="$2"
+ [ -n "$feature" ] || feature="$opt"
+
+ if enabled gcc && ! disabled "$feature" && ! check_cflags "-m$opt"; then
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-$feature "
+ else
+ soft_enable "$feature"
+ fi
+}
+
write_common_config_banner() {
print_webm_license config.mk "##" ""
echo '# This file automatically generated by configure. Do not edit!' >> config.mk
@@ -405,8 +419,8 @@ true
}
write_common_target_config_mk() {
- local CC=${CC}
- local CXX=${CXX}
+ local CC="${CC}"
+ local CXX="${CXX}"
enabled ccache && CC="ccache ${CC}"
enabled ccache && CXX="ccache ${CXX}"
print_webm_license $1 "##" ""
@@ -504,7 +518,7 @@ process_common_cmdline() {
--enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${ARCH_EXT_LIST}" | grep "^ *$option\$" >/dev/null; then
- [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}${opt} "
+ [ $action = "disable" ] && RTCD_OPTIONS="${RTCD_OPTIONS}--disable-${option} "
elif [ $action = "disable" ] && ! disabled $option ; then
echo "${CMDLINE_SELECT}" | grep "^ *$option\$" >/dev/null ||
die_unknown $opt
@@ -778,8 +792,12 @@ process_common_toolchain() {
arm*)
# on arm, isa versions are supersets
case ${tgt_isa} in
+ armv8)
+ soft_enable neon
+ ;;
armv7)
soft_enable neon
+ soft_enable neon_asm
soft_enable media
soft_enable edsp
soft_enable fast_unaligned
@@ -817,7 +835,7 @@ EOF
check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
- if enabled neon
+ if enabled neon || enabled neon_asm
then
check_add_cflags -mfpu=neon #-ftree-vectorize
check_add_asflags -mfpu=neon
@@ -845,19 +863,26 @@ EOF
msvs_arch_dir=arm-msvs
disable_feature multithread
disable_feature unit_tests
+ vs_version=${tgt_cc##vs}
+ if [ $vs_version -ge 12 ]; then
+ # MSVC 2013 doesn't allow doing plain .exe projects for ARM,
+ # only "AppContainerApplication" which requires an AppxManifest.
+ # Therefore disable the examples, just build the library.
+ disable_feature examples
+ fi
;;
rvct)
CC=armcc
AR=armar
AS=armasm
- LD=${source_path}/build/make/armlink_adapter.sh
+ LD="${source_path}/build/make/armlink_adapter.sh"
STRIP=arm-none-linux-gnueabi-strip
NM=arm-none-linux-gnueabi-nm
tune_cflags="--cpu="
tune_asflags="--cpu="
if [ -z "${tune_cpu}" ]; then
if [ ${tgt_isa} = "armv7" ]; then
- if enabled neon
+ if enabled neon || enabled neon_asm
then
check_add_cflags --fpu=softvfp+vfpv3
check_add_asflags --fpu=softvfp+vfpv3
@@ -925,41 +950,26 @@ EOF
;;
darwin*)
- if [ -z "${sdk_path}" ]; then
- SDK_PATH=`xcode-select -print-path 2> /dev/null`
- SDK_PATH=${SDK_PATH}/Platforms/iPhoneOS.platform/Developer
- else
- SDK_PATH=${sdk_path}
- fi
- TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
- CXX=${TOOLCHAIN_PATH}/g++
- CC=${TOOLCHAIN_PATH}/gcc
- AR=${TOOLCHAIN_PATH}/ar
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
- AS=${TOOLCHAIN_PATH}/as
- STRIP=${TOOLCHAIN_PATH}/strip
- NM=${TOOLCHAIN_PATH}/nm
+
+ XCRUN_FIND="xcrun --sdk iphoneos -find"
+ CXX="$(${XCRUN_FIND} clang++)"
+ CC="$(${XCRUN_FIND} clang)"
+ AR="$(${XCRUN_FIND} ar)"
+ LD="$(${XCRUN_FIND} ld)"
+ AS="$(${XCRUN_FIND} as)"
+ STRIP="$(${XCRUN_FIND} strip)"
+ NM="$(${XCRUN_FIND} nm)"
+ RANLIB="$(${XCRUN_FIND} ranlib)"
AS_SFX=.s
# ASFLAGS is written here instead of using check_add_asflags
# because we need to overwrite all of ASFLAGS and purge the
# options that were put in above
- ASFLAGS="-version -arch ${tgt_isa} -g"
-
- add_cflags -arch ${tgt_isa}
- add_ldflags -arch_only ${tgt_isa}
-
- if [ -z "${alt_libc}" ]; then
- alt_libc=${SDK_PATH}/SDKs/iPhoneOS6.0.sdk
- fi
-
- add_cflags "-isysroot ${alt_libc}"
+ ASFLAGS="-arch ${tgt_isa} -g"
- # Add the paths for the alternate libc
- for d in usr/include; do
- try_dir="${alt_libc}/${d}"
- [ -d "${try_dir}" ] && add_cflags -I"${try_dir}"
- done
+ alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)"
+ add_cflags -arch ${tgt_isa} -isysroot ${alt_libc}
+ add_ldflags -arch ${tgt_isa} -ios_version_min 7.0
for d in lib usr/lib usr/lib/system; do
try_dir="${alt_libc}/${d}"
@@ -1091,34 +1101,29 @@ EOF
# Skip the check by setting AS arbitrarily
AS=msvs
msvs_arch_dir=x86-msvs
+ vc_version=${tgt_cc##vs}
+ case $vc_version in
+ 7|8|9|10)
+ echo "${tgt_cc} does not support avx/avx2, disabling....."
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx --disable-avx2 "
+ soft_disable avx
+ soft_disable avx2
+ ;;
+ esac
;;
esac
soft_enable runtime_cpu_detect
- soft_enable mmx
- soft_enable sse
- soft_enable sse2
- soft_enable sse3
- soft_enable ssse3
# We can't use 'check_cflags' until the compiler is configured and CC is
# populated.
- if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 "
- else
- soft_enable sse4_1
- fi
-
- if enabled gcc && ! disabled avx && ! check_cflags -mavx; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx "
- else
- soft_enable avx
- fi
-
- if enabled gcc && ! disabled avx2 && ! check_cflags -mavx2; then
- RTCD_OPTIONS="${RTCD_OPTIONS}--disable-avx2 "
- else
- soft_enable avx2
- fi
+ check_gcc_machine_option mmx
+ check_gcc_machine_option sse
+ check_gcc_machine_option sse2
+ check_gcc_machine_option sse3
+ check_gcc_machine_option ssse3
+ check_gcc_machine_option sse4 sse4_1
+ check_gcc_machine_option avx
+ check_gcc_machine_option avx2
case "${AS}" in
auto|"")
@@ -1205,8 +1210,8 @@ EOF
fi
# default use_x86inc to yes if pic is no or 64bit or we are not on darwin
- echo " checking here for x86inc \"${tgt_isa}\" \"$pic\" "
- if [ ${tgt_isa} = x86_64 -o ! "$pic" = "yes" -o "${tgt_os#darwin}" = "${tgt_os}" ]; then
+ if [ ${tgt_isa} = x86_64 -o ! "$pic" = "yes" -o \
+ "${tgt_os#darwin}" = "${tgt_os}" ]; then
soft_enable use_x86inc
fi
@@ -1345,10 +1350,10 @@ process() {
if enabled source_path_used; then
# Prepare the PWD for building.
for f in ${OOT_INSTALLS}; do
- install -D ${source_path}/$f $f
+ install -D "${source_path}/$f" "$f"
done
fi
- cp ${source_path}/build/make/Makefile .
+ cp "${source_path}/build/make/Makefile" .
clean_temp_files
true