From: Bart Van Assche Date: Thu, 26 Jun 2008 08:58:25 +0000 (+0000) Subject: Let the compiler print a comprehensible error message if it does not provide built... X-Git-Tag: svn/VALGRIND_3_4_0~430 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a111b33ffcbd13d7c6ed40021e4e37fb1df08a7;p=thirdparty%2Fvalgrind.git Let the compiler print a comprehensible error message if it does not provide built-in functions for atomic memory access. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8284 --- diff --git a/helgrind/tests/tc11_XCHG.c b/helgrind/tests/tc11_XCHG.c index 1d9df4c281..28ef78383b 100644 --- a/helgrind/tests/tc11_XCHG.c +++ b/helgrind/tests/tc11_XCHG.c @@ -1,4 +1,5 @@ +#include "config.h" #include #include #include @@ -47,6 +48,7 @@ ) #elif defined(PLAT_ppc32_linux) || defined(PLAT_ppc64_linux) \ || defined(PLAT_ppc32_aix5) || defined(PLAT_ppc64_aix5) +#ifdef HAVE_BUILTIN_ATOMIC # define XCHG_M_R(_addr,_lval) \ do { \ int tmp; \ @@ -55,6 +57,9 @@ ; \ _lval = tmp; \ } while (0) +#else +#error "XCHG_M_R() implementation is missing. Either provide one or use a newer gcc version." +#endif # define XCHG_M_R_with_redundant_LOCK(_addr,_lval) \ XCHG_M_R(_addr,_lval) #else