[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt PATCH 0.5/2] meson: link libm

(So here is a separate patch to add linking of libm. Care to ACK it?
Also, what are peoples' opinions of pushing these patches now, so that
they'll be in the upcoming release? I've put them on a private gitlab
branch so that the CI is run (and found two mingw build problems :-)),
except I haven't been able to make the cirrus-ci thing that builds
freebsd and macos to work.)

On some platforms libm (needed for the pow() function) isn't being
linked in somehow. This patch adds the necessary bits to assure that
it's linked in when necessary.

Suggested-by: Michal Privoznik <mprivozn redhat com>
Signed-off-by: Laine Stump <laine redhat com>
 meson.build          | 3 +++
 src/util/meson.build | 1 +
 2 files changed, 4 insertions(+)

diff --git a/meson.build b/meson.build
index dabd4196e6..81668a6681 100644
--- a/meson.build
+++ b/meson.build
@@ -1176,6 +1176,9 @@ endif
 libxml_version = '2.9.1'
 libxml_dep = dependency('libxml-2.0', version: '>=' + libxml_version)
+cc = meson.get_compiler('c')
+m_dep = cc.find_library('m', required : false)
 use_macvtap = false
 if not get_option('macvtap').disabled()
   if (cc.has_header_symbol('linux/if_link.h', 'MACVLAN_MODE_BRIDGE') and
diff --git a/src/util/meson.build b/src/util/meson.build
index a7017f459f..f7092cc3f1 100644
--- a/src/util/meson.build
+++ b/src/util/meson.build
@@ -188,6 +188,7 @@ virt_util_lib = static_library(
+    m_dep,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]