summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2012-12-19 06:59:45 +0000
committerDmitry Vyukov <dvyukov@google.com>2012-12-19 06:59:45 +0000
commitb75c67b495ca13801cc629b2c2c9dd0010e54739 (patch)
treee0ba0df845b8f6ddb8a7e10edcda91d9e31d7149 /lib
parentb1f21c69e02d99944c66e0520d07d8c14d99756f (diff)
downloadcompiler-rt-b75c67b495ca13801cc629b2c2c9dd0010e54739.tar.gz
compiler-rt-b75c67b495ca13801cc629b2c2c9dd0010e54739.tar.bz2
compiler-rt-b75c67b495ca13801cc629b2c2c9dd0010e54739.tar.xz
tsan: fix -Wgnu warnings
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@170499 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/tsan/Makefile.old4
-rw-r--r--lib/tsan/rtl/Makefile.old5
-rw-r--r--lib/tsan/rtl/tsan_interceptors.cc12
3 files changed, 12 insertions, 9 deletions
diff --git a/lib/tsan/Makefile.old b/lib/tsan/Makefile.old
index ff81fa9d..034261a1 100644
--- a/lib/tsan/Makefile.old
+++ b/lib/tsan/Makefile.old
@@ -8,7 +8,7 @@ ifeq ($(DEBUG), 0)
CXXFLAGS += -O3
endif
ifeq ($(CXX), clang++)
- CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline
+ CXXFLAGS+= -Wno-unused-private-field -Wno-static-in-inline -Wgnu
endif
LIBTSAN=rtl/libtsan.a
@@ -35,7 +35,7 @@ help:
@ echo " make install_deps # Install third-party dependencies required for building"
@ echo " make presubmit # Run it every time before committing"
@ echo
- @ echo "For more info, see http://code.google.com/p/data-race-test/wiki/ThreadSanitizer2"
+ @ echo "For more info, see http://code.google.com/p/thread-sanitizer/wiki/Development"
$(LIBTSAN): libtsan
diff --git a/lib/tsan/rtl/Makefile.old b/lib/tsan/rtl/Makefile.old
index 89ce8322..51da5bbf 100644
--- a/lib/tsan/rtl/Makefile.old
+++ b/lib/tsan/rtl/Makefile.old
@@ -1,6 +1,9 @@
CXXFLAGS = -fPIE -g -Wall -Werror -fno-builtin -DTSAN_DEBUG=$(DEBUG)
ifeq ($(DEBUG), 0)
- CXXFLAGS += -O3
+ CXXFLAGS += -O3
+endif
+ifeq ($(CXX), clang++)
+ CXXFLAGS+= -Wgnu
endif
# For interception. FIXME: move interception one level higher.
diff --git a/lib/tsan/rtl/tsan_interceptors.cc b/lib/tsan/rtl/tsan_interceptors.cc
index da7356ca..eb67c524 100644
--- a/lib/tsan/rtl/tsan_interceptors.cc
+++ b/lib/tsan/rtl/tsan_interceptors.cc
@@ -1137,9 +1137,9 @@ TSAN_INTERCEPTOR(int, signalfd, int fd, void *mask, int flags) {
return fd;
}
-TSAN_INTERCEPTOR(int, inotify_init) {
- SCOPED_TSAN_INTERCEPTOR(inotify_init);
- int fd = REAL(inotify_init)();
+TSAN_INTERCEPTOR(int, inotify_init, int fake) {
+ SCOPED_TSAN_INTERCEPTOR(inotify_init, fake);
+ int fd = REAL(inotify_init)(fake);
if (fd >= 0)
FdInotifyCreate(thr, pc, fd);
return fd;
@@ -1617,10 +1617,10 @@ TSAN_INTERCEPTOR(int, munlockall, void) {
return 0;
}
-TSAN_INTERCEPTOR(int, fork) {
- SCOPED_TSAN_INTERCEPTOR(fork);
+TSAN_INTERCEPTOR(int, fork, int fake) {
+ SCOPED_TSAN_INTERCEPTOR(fork, fake);
// It's intercepted merely to process pending signals.
- int pid = REAL(fork)();
+ int pid = REAL(fork)(fake);
if (pid == 0) {
// child
FdOnFork(thr, pc);