From 8a111b33ffcbd13d7c6ed40021e4e37fb1df08a7 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 26 Jun 2008 08:58:25 +0000 Subject: [PATCH] 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 --- helgrind/tests/tc11_XCHG.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.2