aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-02-06 17:31:14 +0100
committerLuca Barbato <lu_zero@gentoo.org>2016-02-09 20:02:31 +0100
commit34c9eba982c75196392a3b0b245dd34297c4511d (patch)
tree2bf3ad1a60ebce6a08c8f0dfaff0c52aef6ef6fc /configure
parentdd53af4b37c7790ce26065b36d5655c1af38b295 (diff)
downloadffmpeg-34c9eba982c75196392a3b0b245dd34297c4511d.tar.gz
configure: Refactor toolchain flag setting
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure53
1 files changed, 26 insertions, 27 deletions
diff --git a/configure b/configure
index 46b768c826..272bb1e797 100755
--- a/configure
+++ b/configure
@@ -2718,43 +2718,42 @@ echo "# $0 $LIBAV_CONFIGURATION" > $logfile
set >> $logfile
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 -O1
- 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
+ case "$toolchain" in
+ clang-usan)
+ add_cflags -O1
+ ;;
+ esac
;;
- valgrind-massif)
- target_exec_default="valgrind"
- target_exec_args="--alloc-fn=av_malloc --alloc-fn=av_mallocz"
- ;;
- valgrind-memcheck)
+ valgrind-*)
target_exec_default="valgrind"
- target_exec_args="--track-origins=yes --leak-check=full"
+ case "$toolchain" in
+ valgrind-massif)
+ target_exec_args="--alloc-fn=av_malloc --alloc-fn=av_mallocz"
+ ;;
+ valgrind-memcheck)
+ target_exec_args="--track-origins=yes --leak-check=full"
+ ;;
+ esac
;;
msvc)
# Check whether the current MSVC version needs the C99 converter.