[PATCH libdrm v1] meson: fix libdl/shared library support detection for nouveau tests
Peter Seiderer
ps.report at gmx.net
Fri Aug 9 23:23:37 UTC 2019
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 at gmx.net>
---
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
More information about the dri-devel
mailing list