[igt-dev] [PATCH i-g-t 1/4] tests: add libatomic dependency

Guillaume Tucker guillaume.tucker at collabora.com
Mon Jun 3 11:54:47 UTC 2019


Add dependency to libatomic in order to be able to use the __atomic_*
functions instead of the older __sync_* ones.  This is to enable
atomic operations on a wider number of architectures including MIPS.

Signed-off-by: Guillaume Tucker <guillaume.tucker at collabora.com>
---
 meson.build       | 1 +
 tests/meson.build | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 6268c58d3634..4e5bb323fa49 100644
--- a/meson.build
+++ b/meson.build
@@ -179,6 +179,7 @@ math = cc.find_library('m')
 realtime = cc.find_library('rt')
 dlsym = cc.find_library('dl')
 zlib = cc.find_library('z')
+libatomic = cc.find_library('atomic')
 
 if cc.has_header('linux/kd.h')
 	config.set('HAVE_LINUX_KD_H', 1)
diff --git a/tests/meson.build b/tests/meson.build
index 806766e51667..6877ccd59235 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -233,7 +233,7 @@ i915_progs = [
 	'i915_suspend',
 ]
 
-test_deps = [ igt_deps ]
+test_deps = [ igt_deps, libatomic ]
 
 if libdrm_nouveau.found()
 	test_progs += [
-- 
2.20.1



More information about the igt-dev mailing list