summaryrefslogtreecommitdiff
path: root/src/third_party
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2017-03-02 15:36:33 -0500
committerAndrew Morrow <acm@mongodb.com>2017-03-03 09:58:30 -0500
commit4435e71c4e6ddef7086f626d87eb90315456b962 (patch)
tree14934818bf80f79045d76fe24a5435ed93a2ee78 /src/third_party
parentaaee42ed5273eb36b9eb7f28cd1f437abcd610fd (diff)
downloadmongo-4435e71c4e6ddef7086f626d87eb90315456b962.tar.gz
SERVER-26323 Roll back to per-arch atomics in gperftools
We suspect that the GCC based atomics in atomicops-internals-gcc.h may not accurately implement the intended semantics of the functions in the base::subtle API.
Diffstat (limited to 'src/third_party')
-rw-r--r--src/third_party/gperftools-2.5/SConscript1
-rw-r--r--src/third_party/gperftools-2.5/src/base/atomicops.h3
2 files changed, 2 insertions, 2 deletions
diff --git a/src/third_party/gperftools-2.5/SConscript b/src/third_party/gperftools-2.5/SConscript
index b9e7ca1d418..104f4e62270 100644
--- a/src/third_party/gperftools-2.5/SConscript
+++ b/src/third_party/gperftools-2.5/SConscript
@@ -7,6 +7,7 @@ Import("debugBuild")
env = env.Clone()
files = [
+ 'src/base/atomicops-internals-x86.cc',
'src/base/dynamic_annotations.c',
'src/base/elf_mem_image.cc',
'src/base/logging.cc',
diff --git a/src/third_party/gperftools-2.5/src/base/atomicops.h b/src/third_party/gperftools-2.5/src/base/atomicops.h
index e2ea8b18e96..be038f34416 100644
--- a/src/third_party/gperftools-2.5/src/base/atomicops.h
+++ b/src/third_party/gperftools-2.5/src/base/atomicops.h
@@ -102,8 +102,7 @@
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
-// MongoDB modification: We always have a new enough toolchain to use the GCC atomics
-#if defined(__GNUC__)
+#if defined(TCMALLOC_PREFER_GCC_ATOMICS) && defined(__GNUC__) && GCC_VERSION >= 40700
#include "base/atomicops-internals-gcc.h"
#elif defined(__MACH__) && defined(__APPLE__)
#include "base/atomicops-internals-macosx.h"