drm: Branch 'master'

[email protected] (Eric Engestr??m) Fri, 9 Mar 2018 17:14:27 +0000 (UTC)
Newsgroups gmane.comp.video.dri.patches
Message-ID <[email protected]>
 amdgpu/meson.build    |    2 +-
 etnaviv/meson.build   |    2 +-
 freedreno/meson.build |    2 +-
 intel/meson.build     |    2 +-
 meson.build           |    4 +++-
 nouveau/meson.build   |    2 +-
 omap/meson.build      |    2 +-
 radeon/meson.build    |    2 +-
 tegra/meson.build     |    2 +-
 9 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 5236de6cc1ee3759567e0fd8cd6260386b8d5b7e
Author: Eric Engestrom <[email protected]>
Date:   Wed Feb 7 14:20:52 2018 +0000

    meson: use pkg-config to detect libatomic_ops
    
    Signed-off-by: Eric Engestrom <[email protected]>
    Reviewed-by: Emil Velikov <[email protected]>

diff --git a/amdgpu/meson.build b/amdgpu/meson.build
index 518b8504..f39d7bf6 100644
--- a/amdgpu/meson.build
+++ b/amdgpu/meson.build
@@ -37,7 +37,7 @@ libdrm_amdgpu = shared_library(
   ],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : dep_pthread_stubs,
+  dependencies : [dep_pthread_stubs, dep_atomic_ops],
   version : '1.0.0',
   install : true,
 )
diff --git a/etnaviv/meson.build b/etnaviv/meson.build
index 1767733b..ca2aa544 100644
--- a/etnaviv/meson.build
+++ b/etnaviv/meson.build
@@ -31,7 +31,7 @@ libdrm_etnaviv = shared_library(
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
   c_args : warn_c_args,
-  dependencies : [dep_pthread_stubs, dep_rt],
+  dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops],
   version : '1.0.0',
   install : true,
 )
diff --git a/freedreno/meson.build b/freedreno/meson.build
index 741b3b6a..015b7fb1 100644
--- a/freedreno/meson.build
+++ b/freedreno/meson.build
@@ -44,7 +44,7 @@ libdrm_freedreno = shared_library(
   [files_freedreno, config_file],
   c_args : warn_c_args,
   include_directories : [inc_root, inc_drm],
-  dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt],
+  dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops],
   link_with : libdrm,
   version : '1.0.0',
   install : true,
diff --git a/intel/meson.build b/intel/meson.build
index aa5a1349..53c7fce4 100644
--- a/intel/meson.build
+++ b/intel/meson.build
@@ -29,7 +29,7 @@ libdrm_intel = shared_library(
   ],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind],
+  dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops],
   c_args : warn_c_args,
   version : '1.0.0',
   install : true,
diff --git a/meson.build b/meson.build
index c803f709..df6f2bd2 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,7 @@ cc = meson.get_compiler('c')
 intel_atomics = false
 lib_atomics = false
 
+dep_atomic_ops = dependency('atomic_ops', required : false)
 if cc.compiles('''
     int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
     int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
@@ -55,7 +56,8 @@ if cc.compiles('''
     name : 'Intel Atomics')
   intel_atomics = true
   with_atomics = true
-elif cc.has_header('atomic_ops.h')
+  dep_atomic_ops = []
+elif dep_atomic_ops.found()
   lib_atomics = true
   with_atomics = true
 elif cc.has_function('atomic_cas_uint')
diff --git a/nouveau/meson.build b/nouveau/meson.build
index 80a8678c..51c9a712 100644
--- a/nouveau/meson.build
+++ b/nouveau/meson.build
@@ -25,7 +25,7 @@ libdrm_nouveau = shared_library(
   c_args : warn_c_args,
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : dep_threads,
+  dependencies : [dep_threads, dep_atomic_ops],
   version : '2.0.0',
   install : true,
 )
diff --git a/omap/meson.build b/omap/meson.build
index 8adb2213..e57b8f5d 100644
--- a/omap/meson.build
+++ b/omap/meson.build
@@ -24,7 +24,7 @@ libdrm_omap = shared_library(
   include_directories : [inc_root, inc_drm],
   c_args : warn_c_args,
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs],
+  dependencies : [dep_pthread_stubs, dep_atomic_ops],
   version : '1.0.0',
   install : true,
 )
diff --git a/radeon/meson.build b/radeon/meson.build
index a4171b41..b08c7442 100644
--- a/radeon/meson.build
+++ b/radeon/meson.build
@@ -31,7 +31,7 @@ libdrm_radeon = shared_library(
   c_args : warn_c_args,
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs],
+  dependencies : [dep_pthread_stubs, dep_atomic_ops],
   version : '1.0.1',
   install : true,
 )
diff --git a/tegra/meson.build b/tegra/meson.build
index 7c671cd5..1f5c74b3 100644
--- a/tegra/meson.build
+++ b/tegra/meson.build
@@ -23,7 +23,7 @@ libdrm_tegra = shared_library(
   [files('tegra.c'), config_file],
   include_directories : [inc_root, inc_drm],
   link_with : libdrm,
-  dependencies : [dep_pthread_stubs],
+  dependencies : [dep_pthread_stubs, dep_atomic_ops],
   c_args : warn_c_args,
   version : '0.0.0',
   install : true,

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
--