iscsi: link libm into the module

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 <yisun@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-06-01 10:00:48 +02:00
parent 96acfb1f25
commit 7fa1c63553
2 changed files with 3 additions and 3 deletions

View File

@ -73,7 +73,7 @@ modsrc = []
foreach m : [ foreach m : [
[curl, 'curl', files('curl.c')], [curl, 'curl', files('curl.c')],
[glusterfs, 'gluster', files('gluster.c')], [glusterfs, 'gluster', files('gluster.c')],
[libiscsi, 'iscsi', files('iscsi.c')], [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
[libnfs, 'nfs', files('nfs.c')], [libnfs, 'nfs', files('nfs.c')],
[libssh, 'ssh', files('ssh.c')], [libssh, 'ssh', files('ssh.c')],
[rbd, 'rbd', files('rbd.c')], [rbd, 'rbd', files('rbd.c')],

View File

@ -163,7 +163,7 @@ if targetos != 'linux' and get_option('multiprocess').enabled()
endif endif
multiprocess_allowed = targetos == 'linux' and not get_option('multiprocess').disabled() 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) util = cc.find_library('util', required: false)
winmm = [] winmm = []
socket = [] socket = []
@ -1899,7 +1899,7 @@ util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false) util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil', libqemuutil = static_library('qemuutil',
sources: util_ss.sources() + stub_ss.sources() + genh, 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, qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res) sources: genh + version_res)