All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] meson.build: fix intel atomics detection
@ 2018-07-18 19:33 Peter Seiderer
  2018-07-18 19:33 ` [PATCH v2 2/2] meson.build: enable static build Peter Seiderer
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Seiderer @ 2018-07-18 19:33 UTC (permalink / raw)
  To: dri-devel

Use the stronger compiler.link() test (instead of the weaker
compiler.compile()) to fix the intel atomics detection.

Fixes false positive in case of sparc compile (buildroot toolchain).

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - link test needs main() method
---
 meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 9b443a50..3c8afb6d 100644
--- a/meson.build
+++ b/meson.build
@@ -49,9 +49,10 @@ intel_atomics = false
 lib_atomics = false
 
 dep_atomic_ops = dependency('atomic_ops', required : false)
-if cc.compiles('''
+if cc.links('''
     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); }
+    int main() { }
     ''',
     name : 'Intel Atomics')
   intel_atomics = true
-- 
2.18.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2 2/2] meson.build: enable static build
  2018-07-18 19:33 [PATCH v2 1/2] meson.build: fix intel atomics detection Peter Seiderer
@ 2018-07-18 19:33 ` Peter Seiderer
  2018-09-19 15:02   ` Timo Aaltonen
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Seiderer @ 2018-07-18 19:33 UTC (permalink / raw)
  To: dri-devel

Use meson library instead of shared_library to enable static build.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - new patch
---
 amdgpu/meson.build    | 2 +-
 etnaviv/meson.build   | 2 +-
 exynos/meson.build    | 2 +-
 freedreno/meson.build | 2 +-
 intel/meson.build     | 2 +-
 libkms/meson.build    | 2 +-
 meson.build           | 2 +-
 nouveau/meson.build   | 2 +-
 omap/meson.build      | 2 +-
 radeon/meson.build    | 2 +-
 tegra/meson.build     | 2 +-
 11 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/amdgpu/meson.build b/amdgpu/meson.build
index f39d7bf6..1b4b0be6 100644
--- a/amdgpu/meson.build
+++ b/amdgpu/meson.build
@@ -21,7 +21,7 @@
 
 datadir_amdgpu = join_paths(get_option('prefix'), get_option('datadir'), 'libdrm')
 
-libdrm_amdgpu = shared_library(
+libdrm_amdgpu = library(
   'drm_amdgpu',
   [
     files(
diff --git a/etnaviv/meson.build b/etnaviv/meson.build
index ca2aa544..a0d994ea 100644
--- a/etnaviv/meson.build
+++ b/etnaviv/meson.build
@@ -19,7 +19,7 @@
 # SOFTWARE.
 
 
-libdrm_etnaviv = shared_library(
+libdrm_etnaviv = library(
   'drm_etnaviv',
   [
     files(
diff --git a/exynos/meson.build b/exynos/meson.build
index 30d36405..fd14f3a6 100644
--- a/exynos/meson.build
+++ b/exynos/meson.build
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-libdrm_exynos = shared_library(
+libdrm_exynos = library(
   'drm_exynos',
   [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
   c_args : warn_c_args,
diff --git a/freedreno/meson.build b/freedreno/meson.build
index 015b7fb1..6c8a6a7b 100644
--- a/freedreno/meson.build
+++ b/freedreno/meson.build
@@ -39,7 +39,7 @@ if with_freedreno_kgsl
   )
 endif
 
-libdrm_freedreno = shared_library(
+libdrm_freedreno = library(
   'drm_freedreno',
   [files_freedreno, config_file],
   c_args : warn_c_args,
diff --git a/intel/meson.build b/intel/meson.build
index 53c7fce4..14cabd37 100644
--- a/intel/meson.build
+++ b/intel/meson.build
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-libdrm_intel = shared_library(
+libdrm_intel = library(
   'drm_intel',
   [
     files(
diff --git a/libkms/meson.build b/libkms/meson.build
index 86d1a4ee..9d21e4ca 100644
--- a/libkms/meson.build
+++ b/libkms/meson.build
@@ -41,7 +41,7 @@ if with_exynos
   libkms_include += include_directories('../exynos')
 endif
 
-libkms = shared_library(
+libkms = library(
   'kms',
   [files_libkms, config_file],
   c_args : warn_c_args,
diff --git a/meson.build b/meson.build
index 3c8afb6d..7aa5f8c6 100644
--- a/meson.build
+++ b/meson.build
@@ -279,7 +279,7 @@ add_project_arguments('-include', 'config.h', language : 'c')
 inc_root = include_directories('.')
 inc_drm = include_directories('include/drm')
 
-libdrm = shared_library(
+libdrm = library(
   'drm',
   [files(
      'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c',
diff --git a/nouveau/meson.build b/nouveau/meson.build
index 51c9a712..acba048e 100644
--- a/nouveau/meson.build
+++ b/nouveau/meson.build
@@ -19,7 +19,7 @@
 # SOFTWARE.
 
 
-libdrm_nouveau = shared_library(
+libdrm_nouveau = library(
   'drm_nouveau',
   [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
   c_args : warn_c_args,
diff --git a/omap/meson.build b/omap/meson.build
index e57b8f5d..6cffb992 100644
--- a/omap/meson.build
+++ b/omap/meson.build
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-libdrm_omap = shared_library(
+libdrm_omap = library(
   'drm_omap',
   [files('omap_drm.c'), config_file],
   include_directories : [inc_root, inc_drm],
diff --git a/radeon/meson.build b/radeon/meson.build
index b08c7442..2f45ff79 100644
--- a/radeon/meson.build
+++ b/radeon/meson.build
@@ -19,7 +19,7 @@
 # SOFTWARE.
 
 
-libdrm_radeon = shared_library(
+libdrm_radeon = library(
   'drm_radeon',
   [
     files(
diff --git a/tegra/meson.build b/tegra/meson.build
index 1f5c74b3..8d0cfa92 100644
--- a/tegra/meson.build
+++ b/tegra/meson.build
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-libdrm_tegra = shared_library(
+libdrm_tegra = library(
   'drm_tegra',
   [files('tegra.c'), config_file],
   include_directories : [inc_root, inc_drm],
-- 
2.18.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 2/2] meson.build: enable static build
  2018-07-18 19:33 ` [PATCH v2 2/2] meson.build: enable static build Peter Seiderer
@ 2018-09-19 15:02   ` Timo Aaltonen
  0 siblings, 0 replies; 3+ messages in thread
From: Timo Aaltonen @ 2018-09-19 15:02 UTC (permalink / raw)
  To: Peter Seiderer, dri-devel

On 18.07.2018 22:33, Peter Seiderer wrote:
> Use meson library instead of shared_library to enable static build.
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

thanks, seems to work



-- 
t
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-19 15:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-18 19:33 [PATCH v2 1/2] meson.build: fix intel atomics detection Peter Seiderer
2018-07-18 19:33 ` [PATCH v2 2/2] meson.build: enable static build Peter Seiderer
2018-09-19 15:02   ` Timo Aaltonen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.