configure: move -ldl test to meson
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 1 Sep 2020 10:44:23 +0000 (06:44 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 Sep 2020 09:43:16 +0000 (11:43 +0200)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
accel/tcg/meson.build
configure
meson.build

index 2a335b50f20a05d44928e975eafd474940785662..96a76ed23d3dfcb7f3a96fe9467a6954f30b1da6 100644 (file)
@@ -9,7 +9,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'))
+tcg_ss.add(when: 'CONFIG_PLUGIN', if_true: [files('plugin-gen.c'), libdl])
 specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss)
 
 specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files('tcg-all.c', 'cputlb.c'))
index b439b78a9b3f0863e1e62da43fb9963d00b93b22..255d54e069825fa8a51da74a81022ba82ac42993 100755 (executable)
--- a/configure
+++ b/configure
@@ -7463,7 +7463,6 @@ fi
 
 if test "$plugins" = "yes" ; then
     echo "CONFIG_PLUGIN=y" >> $config_host_mak
-    LIBS="-ldl $LIBS"
     # Copy the export object list to the build dir
     if test "$ld_dynamic_list" = "yes" ; then
        echo "CONFIG_HAS_LD_DYNAMIC_LIST=yes" >> $config_host_mak
index d619cd901e95aa3a32f6bb205c0bf7d730e944e9..8cc26fd8596e07fb06ed8683b417036d6952d7db 100644 (file)
@@ -211,6 +211,10 @@ libmpathpersist = not_found
 if config_host.has_key('CONFIG_MPATH')
   libmpathpersist = cc.find_library('mpathpersist')
 endif
+libdl = not_found
+if 'CONFIG_PLUGIN' in config_host
+  libdl = cc.find_library('dl', required: true)
+endif
 libiscsi = not_found
 if 'CONFIG_LIBISCSI' in config_host
   libiscsi = declare_dependency(compile_args: config_host['LIBISCSI_CFLAGS'].split(),