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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 meson.build       | 1 +
 tests/meson.build | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

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(
--
2.22.0

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux