aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Engestrom2018-01-26 09:08:39 -0600
committerEric Engestrom2018-01-29 09:41:52 -0600
commit1d7bbf852094481a8f514ed786b7a7a8af67e5fe (patch)
treee8390c053121a6ccca2991e7c8027e1cfaafbe32
parentd2b0a4ec70d93040159af0cbc15717d35812ffc5 (diff)
downloadexternal-libgbm-1d7bbf852094481a8f514ed786b7a7a8af67e5fe.tar.gz
external-libgbm-1d7bbf852094481a8f514ed786b7a7a8af67e5fe.tar.xz
external-libgbm-1d7bbf852094481a8f514ed786b7a7a8af67e5fe.zip
always define HAVE_VALGRIND
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r--configure.ac2
-rw-r--r--freedreno/freedreno_priv.h2
-rw-r--r--intel/intel_bufmgr_gem.c4
-rw-r--r--meson.build5
4 files changed, 6 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 993c2a27..a0246fe5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -509,6 +509,8 @@ if test "x$VALGRIND" = "xyes"; then
509 AC_MSG_ERROR([Valgrind support required but not present]) 509 AC_MSG_ERROR([Valgrind support required but not present])
510 fi 510 fi
511 AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings]) 511 AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
512else
513 AC_DEFINE([HAVE_VALGRIND], 0)
512fi 514fi
513 515
514AC_MSG_RESULT([$VALGRIND]) 516AC_MSG_RESULT([$VALGRIND])
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 199ccb94..81ad6092 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -200,7 +200,7 @@ offset_bytes(void *end, void *start)
200 return ((char *)end) - ((char *)start); 200 return ((char *)end) - ((char *)start);
201} 201}
202 202
203#ifdef HAVE_VALGRIND 203#if HAVE_VALGRIND
204# include <memcheck.h> 204# include <memcheck.h>
205 205
206/* 206/*
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 71f140f5..386da30e 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -66,7 +66,7 @@
66#include "i915_drm.h" 66#include "i915_drm.h"
67#include "uthash.h" 67#include "uthash.h"
68 68
69#ifdef HAVE_VALGRIND 69#if HAVE_VALGRIND
70#include <valgrind.h> 70#include <valgrind.h>
71#include <memcheck.h> 71#include <memcheck.h>
72#define VG(x) x 72#define VG(x) x
@@ -1629,7 +1629,7 @@ int
1629drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo) 1629drm_intel_gem_bo_map_unsynchronized(drm_intel_bo *bo)
1630{ 1630{
1631 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; 1631 drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
1632#ifdef HAVE_VALGRIND 1632#if HAVE_VALGRIND
1633 drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo; 1633 drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
1634#endif 1634#endif
1635 int ret; 1635 int ret;
diff --git a/meson.build b/meson.build
index 15a1d405..76a081a9 100644
--- a/meson.build
+++ b/meson.build
@@ -257,16 +257,13 @@ foreach t : [[with_intel, 'INTEL'], [with_vmwgfx, 'VMWGFX'],
257 [with_vc4, 'VC4'], 257 [with_vc4, 'VC4'],
258 [with_freedreno_kgsl, 'FREEDRENO_KGSL'], 258 [with_freedreno_kgsl, 'FREEDRENO_KGSL'],
259 [dep_cairo.found(), 'CAIRO'], 259 [dep_cairo.found(), 'CAIRO'],
260 [dep_valgrind.found(), 'VALGRIND'],
260 [with_radeon, 'RADEON']] 261 [with_radeon, 'RADEON']]
261 config.set10('HAVE_@0@'.format(t[1]), t[0]) 262 config.set10('HAVE_@0@'.format(t[1]), t[0])
262endforeach 263endforeach
263if with_freedreno_kgsl and not with_freedreno 264if with_freedreno_kgsl and not with_freedreno
264 error('cannot enable freedreno-kgsl without freedreno support') 265 error('cannot enable freedreno-kgsl without freedreno support')
265endif 266endif
266if dep_valgrind.found()
267 config.set10('HAVE_VALGRIND', true)
268endif
269
270config.set10('_GNU_SOURCE', true) 267config.set10('_GNU_SOURCE', true)
271config_file = configure_file( 268config_file = configure_file(
272 configuration : config, 269 configuration : config,