summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-05-08 17:49:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-05-08 17:49:57 +0200
commitde386effc0532451c193c9c824d58006645e9c8f (patch)
tree5b3d88ea9cb5c861716e1a4d80a89a5e5b2d5340 /external
parent8a6b647990ba435a1b0b169d321d4f50550e567d (diff)
Make external/python3 play well with -fsanitize=address
Change-Id: I72a9ec9569bcd74e212ad98456a76869ac213221
Diffstat (limited to 'external')
-rw-r--r--external/python3/UnpackedTarball_python3.mk6
-rw-r--r--external/python3/python-3.3.3-disable-obmalloc.patch.021
2 files changed, 27 insertions, 0 deletions
diff --git a/external/python3/UnpackedTarball_python3.mk b/external/python3/UnpackedTarball_python3.mk
index 9ca68d59994e..15ca76af9c20 100644
--- a/external/python3/UnpackedTarball_python3.mk
+++ b/external/python3/UnpackedTarball_python3.mk
@@ -37,4 +37,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,python3,\
))
endif
+ifneq ($(ENABLE_RUNTIME_OPTIMIZATIONS),TRUE)
+$(eval $(call gb_UnpackedTarball_add_patches,python3,\
+ external/python3/python-3.3.3-disable-obmalloc.patch.0 \
+))
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/python3/python-3.3.3-disable-obmalloc.patch.0 b/external/python3/python-3.3.3-disable-obmalloc.patch.0
new file mode 100644
index 000000000000..639cff65db23
--- /dev/null
+++ b/external/python3/python-3.3.3-disable-obmalloc.patch.0
@@ -0,0 +1,21 @@
+--- Objects/obmalloc.c
++++ Objects/obmalloc.c
+@@ -9,8 +9,8 @@
+ #endif
+ #endif
+
++#define WITH_VALGRIND
+ #ifdef WITH_VALGRIND
+-#include <valgrind/valgrind.h>
+
+ /* If we're using GCC, use __builtin_expect() to reduce overhead of
+ the valgrind checks */
+@@ -771,7 +771,7 @@
+
+ #ifdef WITH_VALGRIND
+ if (UNLIKELY(running_on_valgrind == -1))
+- running_on_valgrind = RUNNING_ON_VALGRIND;
++ running_on_valgrind = 1;
+ if (UNLIKELY(running_on_valgrind))
+ goto redirect;
+ #endif