Skip to contentSkip to conversation

meson: fix libdl/shared library support detection for nouveau tests

PATCH New Peter Seiderer 1 participant 1 message Aug 9, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: fix libdl/shared library support detection for nouveau tests

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

---
 meson.build       | 1 +
 tests/meson.build | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
meson.build +1 -0
index adaaf22..b78d9e5 100644
@@ -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 = []
tests/meson.build +4 -1
index 6c8ddd9..f7cb5f0 100644
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel