[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 7/9] configure: Make "does libgio work" test pull in some actual f
From: |
Peter Maydell |
Subject: |
[PULL 7/9] configure: Make "does libgio work" test pull in some actual functions |
Date: |
Tue, 17 Nov 2020 13:48:32 +0000 |
In commit 76346b6264a9b01979 we tried to add a configure check that
the libgio pkg-config data was correct, which builds an executable
linked against it. Unfortunately this doesn't catch the problem
(missing static library dependency info), because a "do nothing" test
source file doesn't have any symbol references that cause the linker
to pull in .o files from libgio.a, and so we don't see the "missing
symbols from libmount" error that a full QEMU link triggers.
(The ineffective test went unnoticed because of a typo that
effectively disabled libgio unconditionally, but after commit
3569a5dfc11f2 fixed that, a static link of the system emulator on
Ubuntu stopped working again.)
Improve the gio test by having the test source fragment reference a
g_dbus function (which is what is indirectly causing us to end up
wanting functions from libmount).
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20201116104617.18333-1-peter.maydell@linaro.org
---
configure | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 4cef321d9dc..2717cf1db0a 100755
--- a/configure
+++ b/configure
@@ -3512,8 +3512,15 @@ if $pkg_config --atleast-version=$glib_req_ver gio-2.0;
then
# Check that the libraries actually work -- Ubuntu 18.04 ships
# with pkg-config --static --libs data for gio-2.0 that is missing
# -lblkid and will give a link error.
- write_c_skeleton
- if compile_prog "" "$gio_libs" ; then
+ cat > $TMPC <<EOF
+#include <gio/gio.h>
+int main(void)
+{
+ g_dbus_proxy_new_sync(0, 0, 0, 0, 0, 0, 0, 0);
+ return 0;
+}
+EOF
+ if compile_prog "$gio_cflags" "$gio_libs" ; then
gio=yes
else
gio=no
--
2.20.1
- [PULL 0/9] target-arm queue, Peter Maydell, 2020/11/17
- [PULL 1/9] hw/arm/virt: ARM_VIRT must select ARM_GIC, Peter Maydell, 2020/11/17
- [PULL 2/9] exynos: Fix bad printf format specifiers, Peter Maydell, 2020/11/17
- [PULL 5/9] register: Remove unnecessary NULL check, Peter Maydell, 2020/11/17
- [PULL 4/9] target/openrisc: Remove dead code attempting to check "is timer disabled", Peter Maydell, 2020/11/17
- [PULL 3/9] hw/input/ps2.c: Remove remnants of printf debug, Peter Maydell, 2020/11/17
- [PULL 6/9] util/cutils: Fix Coverity array overrun in freq_to_str(), Peter Maydell, 2020/11/17
- [PULL 8/9] hw/misc/tmp105: reset the T_low and T_High registers, Peter Maydell, 2020/11/17
- [PULL 9/9] tmp105: Correct handling of temperature limit checks, Peter Maydell, 2020/11/17
- [PULL 7/9] configure: Make "does libgio work" test pull in some actual functions,
Peter Maydell <=
- Re: [PULL 0/9] target-arm queue, no-reply, 2020/11/17
- Re: [PULL 0/9] target-arm queue, Peter Maydell, 2020/11/17