configure: Make "does libgio work" test pull in some actual functions
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Nov 2020 12:56:33 +0000 (12:56 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 17 Nov 2020 12:56:33 +0000 (12:56 +0000)
commit13ceae6663450b6e49483bf0dc7f8362a949802d
tree462276386d354268c6809163e56b2401e9da7340
parent6d7ccc576d52fe2e7d965bfdb0e63b997e77975a
configure: Make "does libgio work" test pull in some actual functions

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