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

Unified Diff: source/libvpx/build/make/configure.sh

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/build/make/ads2armasm_ms.pl ('k') | source/libvpx/build/make/gen_msvs_proj.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/build/make/configure.sh
===================================================================
--- source/libvpx/build/make/configure.sh (revision 263011)
+++ source/libvpx/build/make/configure.sh (working copy)
@@ -41,7 +41,7 @@
log_file(){
log BEGIN $1
- pr -n -t $1 >>$logfile
+ cat -n $1 >>$logfile
log END $1
}
@@ -274,6 +274,7 @@
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 @@
check_cflags() {
log check_cflags "$@"
- check_cc "$@" <<EOF
+ check_cc -Werror "$@" <<EOF
int x;
EOF
}
@@ -341,7 +342,7 @@
int x;
EOF
;;
- *) check_cxx "$@" <<EOF
+ *) check_cxx -Werror "$@" <<EOF
int x;
EOF
;;
@@ -378,6 +379,19 @@
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 @@
}
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 "##" ""
@@ -1089,31 +1103,17 @@
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
+ 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
- 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
-
case "${AS}" in
auto|"")
which nasm >/dev/null 2>&1 && AS=nasm
« no previous file with comments | « source/libvpx/build/make/ads2armasm_ms.pl ('k') | source/libvpx/build/make/gen_msvs_proj.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698