Introduce DISABLE_PTHREAD_SPINLOCK_INTERCEPT flag

The flag DISABLE_PTHREAD_SPINLOCK_INTERCEPT is set only for MIPS32, and it is
used in DRD and Helgrind as a workaround for the issue #311690.
In short, pthread_spin_lock implementation has local branches to the start of
the function which interferes with the redirection system in Valgrind that
assumes it has to redirect each call/branch to a particular address.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13190 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 78b5339..e0fb12d 100644
--- a/configure.in
+++ b/configure.in
@@ -2053,6 +2053,10 @@
 AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
                [test x$ac_cv_func_pthread_spin_lock = xyes])
 
+if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX ; then
+  AC_DEFINE([DISABLE_PTHREAD_SPINLOCK_INTERCEPT], 1,
+            [Disable intercept pthread_spin_lock() on MIPS32.])
+fi
 
 #----------------------------------------------------------------------------
 # MPI checks