Skip to contentSkip to conversation

meson.build: relax the libdl test to one for the function dlopen

PATCH In review Alex Bennée 2 participants 2 messages Jul 14, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson.build: relax the libdl test to one for the function dlopen

For the *BSD family dlopen is already part of libc so it's not a hard dependency to have a libdl.so library.

---
 meson.build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
meson.build +4 -1
index c6dd70c400..e5de144233 100644
@@ -455,7 +455,10 @@ endif
 rt = cc.find_library('rt', required: false)
 libdl = not_found
 if 'CONFIG_PLUGIN' in config_host
-  libdl = cc.find_library('dl', required: true)
+  libdl = cc.find_library('dl', required: false)
+  if not cc.has_function('dlopen', dependencies: libdl)
+    error('dlopen not found')
+  endif
 endif
 libiscsi = not_found
 if not get_option('libiscsi').auto() or have_block
Signature · 1 line
2.32.0.264.g75ae10bc75
Reviewed-by on v1 1/1
#1 lore raw

meson.build endif · line 461

Quoted 5 lines
meson.build +4 -1
-  libdl = cc.find_library('dl', required: true)
+  libdl = cc.find_library('dl', required: false)
+  if not cc.has_function('dlopen', dependencies: libdl)
+    error('dlopen not found')
+  endif