diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-06-29 13:40:27 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-07-17 16:48:32 +0200 |
commit | 3f4349dc8b9494315f8331b2ea4e8d1f83fb801d (patch) | |
tree | 1e0267b1c907a90c3dddef494be13b9076fa2d9f /configure | |
parent | 9e559533bd825a3e371497875576137a8586c831 (diff) |
coroutine-ucontext: Help valgrind understand coroutines
valgrind tends to get confused and report false positives when you
switch stacks and don't tell it about it.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -2871,6 +2871,22 @@ if compile_prog "" "" ; then fi ######################################## +# check if we have valgrind/valgrind.h + +valgrind_h=no +cat > $TMPC << EOF +#include <valgrind/valgrind.h> +#pragma GCC diagnostic ignored "-Wunused-but-set-variable" +int main(void) { + VALGRIND_STACK_DEREGISTER(0); + return 0; +} +EOF +if compile_prog "" "" ; then + valgrind_h=yes +fi + +######################################## # check if environ is declared has_environ=no @@ -3379,6 +3395,10 @@ if test "$linux_magic_h" = "yes" ; then echo "CONFIG_LINUX_MAGIC_H=y" >> $config_host_mak fi +if test "$valgrind_h" = "yes" ; then + echo "CONFIG_VALGRIND_H=y" >> $config_host_mak +fi + if test "$has_environ" = "yes" ; then echo "CONFIG_HAS_ENVIRON=y" >> $config_host_mak fi |