aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-16 17:44:33 +0000
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-02-16 17:44:33 +0000
commit1c417bad613dafe77e266f57bbbdf5165c701a54 (patch)
tree67216e718fc800d56d2fdaf785a0e79085ef17c4
parenta236e4e8b840b57cc3975db21a5f54cda59753a9 (diff)
parent34c9eba982c75196392a3b0b245dd34297c4511d (diff)
downloadffmpeg-1c417bad613dafe77e266f57bbbdf5165c701a54.tar.gz
Merge commit '34c9eba982c75196392a3b0b245dd34297c4511d'
* commit '34c9eba982c75196392a3b0b245dd34297c4511d': configure: Refactor toolchain flag setting Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rwxr-xr-xconfigure50
1 files changed, 22 insertions, 28 deletions
diff --git a/configure b/configure
index 2148f11044..fbce5d72ea 100755
--- a/configure
+++ b/configure
@@ -3294,43 +3294,37 @@ set >> $logfile
test -n "$valgrind" && toolchain="valgrind-memcheck"
case "$toolchain" in
- clang-asan)
- cc_default="clang"
+ *-asan)
+ cc_default="${toolchain%-asan}"
add_cflags -fsanitize=address
add_ldflags -fsanitize=address
;;
- clang-tsan)
- cc_default="clang"
+ *-tsan)
+ cc_default="${toolchain%-tsan}"
add_cflags -fsanitize=thread -pie
add_ldflags -fsanitize=thread -pie
+ case "$toolchain" in
+ gcc-tsan)
+ add_cflags -fPIC
+ add_ldflags -fPIC
+ ;;
+ esac
;;
- clang-usan)
- cc_default="clang"
- add_cflags -fsanitize=undefined
- add_ldflags -fsanitize=undefined
- ;;
- gcc-asan)
- cc_default="gcc"
- add_cflags -fsanitize=address
- add_ldflags -fsanitize=address
- ;;
- gcc-tsan)
- cc_default="gcc"
- add_cflags -fsanitize=thread -pie -fPIC
- add_ldflags -fsanitize=thread -pie -fPIC
- ;;
- gcc-usan)
- cc_default="gcc"
+ *-usan)
+ cc_default="${toolchain%-usan}"
add_cflags -fsanitize=undefined
add_ldflags -fsanitize=undefined
;;
- valgrind-massif)
- target_exec_default=${valgrind:-"valgrind"}
- target_exec_args="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc"
- ;;
- valgrind-memcheck)
- target_exec_default=${valgrind:-"valgrind"}
- target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
+ valgrind-*)
+ target_exec_default="valgrind"
+ case "$toolchain" in
+ valgrind-massif)
+ target_exec_args="--tool=massif --alloc-fn=av_malloc --alloc-fn=av_mallocz --alloc-fn=av_calloc --alloc-fn=av_fast_padded_malloc --alloc-fn=av_fast_malloc --alloc-fn=av_realloc_f --alloc-fn=av_fast_realloc --alloc-fn=av_realloc"
+ ;;
+ valgrind-memcheck)
+ target_exec_args="--error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
+ ;;
+ esac
;;
msvc)
# Check whether the current MSVC version needs the C99 converter.