diff mbox series

[libdrm,v1] meson: fix libdl/shared library support detection for nouveau tests

Message ID 20190809232337.22307-1-ps.report@gmx.net (mailing list archive)
State New, archived
Headers show
Series [libdrm,v1] meson: fix libdl/shared library support detection for nouveau tests | expand

Commit Message

Peter Seiderer Aug. 9, 2019, 11:23 p.m. UTC
Some toolchains (e.g. br-arm-cortex-m4-full) provide empty libdl
libraries. This fools the dynamic/static detection for tests/nouveau,
so explicit check for library type instead.

Fixes:

  ../tests/nouveau/threaded.c:24:10: fatal error: dlfcn.h: No such file or directory

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 meson.build       | 1 +
 tests/meson.build | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

--
2.22.0
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index adaaf22..b78d9e5 100644
--- a/meson.build
+++ b/meson.build
@@ -168,6 +168,7 @@  endif

 # Among others FreeBSD does not have a separate dl library.
 if not cc.has_function('dlsym')
+  # fooled in case empty libdl provided, e.g. toolchain br-arm-cortex-m4-full
   dep_dl = cc.find_library('dl', required : with_nouveau)
 else
   dep_dl = []
diff --git a/tests/meson.build b/tests/meson.build
index 6c8ddd9..f7cb5f0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -44,8 +44,11 @@  endif
 if with_etnaviv
   subdir('etnaviv')
 endif
+lib_type = get_option('default_library')
 if with_nouveau
-  subdir('nouveau')
+  if lib_type != 'static'
+    subdir('nouveau')
+  endif
 endif

 drmsl = executable(