clang: use -fsantize=address and -fsanitize=thread
authorLuca Barbato <lu_zero@gentoo.org>
Thu, 28 Mar 2013 02:30:53 +0000 (03:30 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 3 Apr 2013 10:23:43 +0000 (12:23 +0200)
The previous syntax is deprecated.

configure

index 46635ce..10246e5 100755 (executable)
--- a/configure
+++ b/configure
@@ -2158,13 +2158,13 @@ sysinclude_default="${sysroot}/usr/include"
 case "$toolchain" in
     clang-asan)
         cc_default="clang"
-        add_cflags  -faddress-sanitizer
-        add_ldflags -faddress-sanitizer
+        add_cflags  -fsanitize=address
+        add_ldflags -fsanitize=address
     ;;
     clang-tsan)
         cc_default="clang"
-        add_cflags  -fthread-sanitizer
-        add_ldflags -fthread-sanitizer
+        add_cflags  -fsanitize=thread -pie
+        add_ldflags -fsanitize=thread -pie
     ;;
     msvc)
         cc_default="c99wrap cl"