changeset 1032:dfc1c7cd8297 datarace

Enable ThreadSanitizer
author Chris Cannam
date Tue, 24 Feb 2015 17:42:00 +0000 (2015-02-24)
parents ce1077bd663a
children
files configure configure.ac
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Mon Feb 09 10:31:07 2015 +0000
+++ b/configure	Tue Feb 24 17:42:00 2015 +0000
@@ -4343,7 +4343,8 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-        CXXFLAGS_DEBUG="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+        CXXFLAGS_DEBUG="-std=c++11 -fpie -pie -fsanitize=thread -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+	LIBS="$LIBS -std=c++11 -fpie -pie -fsanitize=thread"
    	CXXFLAGS_RELEASE="-std=c++11 -g0 -O2 -Wall -pipe"
    	CXXFLAGS_MINIMAL="-std=c++11 -g0 -O0"
 fi
--- a/configure.ac	Mon Feb 09 10:31:07 2015 +0000
+++ b/configure.ac	Tue Feb 24 17:42:00 2015 +0000
@@ -53,7 +53,8 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-        CXXFLAGS_DEBUG="-std=c++11 -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+        CXXFLAGS_DEBUG="-std=c++11 -fpie -pie -fsanitize=thread -Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+	LIBS="$LIBS -std=c++11 -fpie -pie -fsanitize=thread"
    	CXXFLAGS_RELEASE="-std=c++11 -g0 -O2 -Wall -pipe"
    	CXXFLAGS_MINIMAL="-std=c++11 -g0 -O0"
 fi