Skip to contentSkip to conversation

meson: remove useless libdl test

PATCH Applied Paolo Bonzini 3 participants 3 messages Nov 10, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: remove useless libdl test

dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test.

---
 accel/tcg/meson.build | 2 +-
 meson.build           | 8 +-------
 2 files changed, 2 insertions(+), 8 deletions(-)
accel/tcg/meson.build +1 -1
index 137a1a44cc..7a0a79d731 100644
@@ -10,7 +10,7 @@ tcg_ss.add(files(
 ))
 tcg_ss.add(when: 'CONFIG_USER_ONLY', if_true: files('user-exec.c'))
 tcg_ss.add(when: 'CONFIG_SOFTMMU', if_false: files('user-exec-stub.c'))
-tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c'), libdl])
+tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c')])
 specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
 
 specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files(
meson.build +1 -7
index d714ebdb37..06ab63625e 100644
@@ -566,13 +566,7 @@ endif
 spice_headers = spice.partial_dependency(compile_args: true, includes: true)
 
 rt = cc.find_library('rt', required: false)
-libdl = not_found
-if 'CONFIG_PLUGIN' in config_host
-  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
   libiscsi = dependency('libiscsi', version: '>=1.9.0',
Signature · 1 line
2.33.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Paolo Bonzini

dlopen is never used after it is sought via cc.find_library, because plugins use gmodule instead; remove the test.

---
  accel/tcg/meson.build | 2 +-
  meson.build           | 8 +-------
  2 files changed, 2 insertions(+), 8 deletions(-)

Right. I've just grep'ed for "dlopen" or the related dlfcn.h header in the sources and did not see any direct use.