]> Git Repo - qemu.git/commitdiff
iscsi: link libm into the module
authorPaolo Bonzini <[email protected]>
Tue, 1 Jun 2021 08:00:48 +0000 (10:00 +0200)
committerPaolo Bonzini <[email protected]>
Fri, 4 Jun 2021 11:47:07 +0000 (13:47 +0200)
Depending on the configuration of QEMU, some binaries might not need libm
at all.  In that case libiscsi, which uses exp(), will fail to load.
Link it in the module explicitly.

Reported-by: Yi Sun <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
block/meson.build
meson.build

index 9e3388f6334d2ed48fcbf58c2b1a2774b8512378..01861e154584447bcbbbdd60970e3249c947e638 100644 (file)
@@ -73,7 +73,7 @@ modsrc = []
 foreach m : [
   [curl, 'curl', files('curl.c')],
   [glusterfs, 'gluster', files('gluster.c')],
-  [libiscsi, 'iscsi', files('iscsi.c')],
+  [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
   [libnfs, 'nfs', files('nfs.c')],
   [libssh, 'ssh', files('ssh.c')],
   [rbd, 'rbd', files('rbd.c')],
index a45f1a844f1381b1ef3029f4e136049c581dd01f..913cf2a41a9d2c8f215070bb65f1c69fa4cddbb0 100644 (file)
@@ -163,7 +163,7 @@ if targetos != 'linux' and get_option('multiprocess').enabled()
 endif
 multiprocess_allowed = targetos == 'linux' and not get_option('multiprocess').disabled()
 
-m = cc.find_library('m', required: false)
+libm = cc.find_library('m', required: false)
 util = cc.find_library('util', required: false)
 winmm = []
 socket = []
@@ -1899,7 +1899,7 @@ util_ss.add_all(trace_ss)
 util_ss = util_ss.apply(config_all, strict: false)
 libqemuutil = static_library('qemuutil',
                              sources: util_ss.sources() + stub_ss.sources() + genh,
-                             dependencies: [util_ss.dependencies(), m, glib, socket, malloc, pixman])
+                             dependencies: [util_ss.dependencies(), libm, glib, socket, malloc, pixman])
 qemuutil = declare_dependency(link_with: libqemuutil,
                               sources: genh + version_res)
 
This page took 0.033633 seconds and 4 git commands to generate.