* [PATCH] configure: Test that gio libs from pkg-config work
@ 2020-09-28 16:04 Peter Maydell
2020-09-28 16:42 ` Paolo Bonzini
2020-10-19 11:27 ` Philippe Mathieu-Daudé
0 siblings, 2 replies; 6+ messages in thread
From: Peter Maydell @ 2020-09-28 16:04 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Marc-André Lureau
On some hosts (eg Ubuntu Bionic) pkg-config returns a set of
libraries for gio-2.0 which don't actually work when compiling
statically. (Specifically, the returned library string includes
-lmount, but not -lblkid which -lmount depends upon, so linking
fails due to missing symbols.)
Check that the libraries work, and don't enable gio if they don't,
in the same way we do for gnutls.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I wanted a statically-linked system emulation binary (which, yes,
I know is not really something we support :-)). I got one with
suitably liberal use of --disable-foo configure options, and
this was the only thing I couldn't work around that way.
The patch is needed because there's no --disable-gio. I suppose
we could add that instead (or as well)...
Possibly meson offers a nicer way to do this, but this was
simple and gnutls is doing the check this way already.
---
configure | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index e8e8e984f24..cd79227d763 100755
--- a/configure
+++ b/configure
@@ -3762,13 +3762,21 @@ if test "$static" = yes && test "$mingw32" = yes; then
fi
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
- gio=yes
gio_cflags=$($pkg_config --cflags gio-2.0)
gio_libs=$($pkg_config --libs gio-2.0)
gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
if [ ! -x "$gdbus_codegen" ]; then
gdbus_codegen=
fi
+ # 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
+ gio=yes
+ else
+ gio=no
+ fi
else
gio=no
fi
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] configure: Test that gio libs from pkg-config work
2020-09-28 16:04 [PATCH] configure: Test that gio libs from pkg-config work Peter Maydell
@ 2020-09-28 16:42 ` Paolo Bonzini
2020-10-19 11:16 ` Peter Maydell
2020-10-19 11:27 ` Philippe Mathieu-Daudé
1 sibling, 1 reply; 6+ messages in thread
From: Paolo Bonzini @ 2020-09-28 16:42 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Marc-André Lureau
On 28/09/20 18:04, Peter Maydell wrote:
> I wanted a statically-linked system emulation binary (which, yes,
> I know is not really something we support :-)). I got one with
> suitably liberal use of --disable-foo configure options, and
> this was the only thing I couldn't work around that way.
> The patch is needed because there's no --disable-gio. I suppose
> we could add that instead (or as well)...
> Possibly meson offers a nicer way to do this, but this was
> simple and gnutls is doing the check this way already.
No, you'd get just that warning about static libraries not being
available; so I think either this patch or --disable-gio is fine.
Paolo
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure: Test that gio libs from pkg-config work
2020-09-28 16:42 ` Paolo Bonzini
@ 2020-10-19 11:16 ` Peter Maydell
2020-10-19 13:26 ` Paolo Bonzini
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2020-10-19 11:16 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: Marc-André Lureau, QEMU Developers
On Mon, 28 Sep 2020 at 17:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> On 28/09/20 18:04, Peter Maydell wrote:
> > I wanted a statically-linked system emulation binary (which, yes,
> > I know is not really something we support :-)). I got one with
> > suitably liberal use of --disable-foo configure options, and
> > this was the only thing I couldn't work around that way.
> > The patch is needed because there's no --disable-gio. I suppose
> > we could add that instead (or as well)...
> > Possibly meson offers a nicer way to do this, but this was
> > simple and gnutls is doing the check this way already.
>
> No, you'd get just that warning about static libraries not being
> available; so I think either this patch or --disable-gio is fine.
Could I have a Reviewed-by: if you're happy with this patch?
thanks
-- PMM
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure: Test that gio libs from pkg-config work
2020-10-19 11:16 ` Peter Maydell
@ 2020-10-19 13:26 ` Paolo Bonzini
0 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2020-10-19 13:26 UTC (permalink / raw)
To: Peter Maydell; +Cc: Marc-André Lureau, QEMU Developers
On 19/10/20 13:16, Peter Maydell wrote:
> On Mon, 28 Sep 2020 at 17:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 28/09/20 18:04, Peter Maydell wrote:
>>> I wanted a statically-linked system emulation binary (which, yes,
>>> I know is not really something we support :-)). I got one with
>>> suitably liberal use of --disable-foo configure options, and
>>> this was the only thing I couldn't work around that way.
>>> The patch is needed because there's no --disable-gio. I suppose
>>> we could add that instead (or as well)...
>>> Possibly meson offers a nicer way to do this, but this was
>>> simple and gnutls is doing the check this way already.
>>
>> No, you'd get just that warning about static libraries not being
>> available; so I think either this patch or --disable-gio is fine.
>
> Could I have a Reviewed-by: if you're happy with this patch?
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] configure: Test that gio libs from pkg-config work
2020-09-28 16:04 [PATCH] configure: Test that gio libs from pkg-config work Peter Maydell
2020-09-28 16:42 ` Paolo Bonzini
@ 2020-10-19 11:27 ` Philippe Mathieu-Daudé
1 sibling, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-19 11:27 UTC (permalink / raw)
To: Peter Maydell, qemu-devel; +Cc: Paolo Bonzini, Marc-André Lureau
On 9/28/20 6:04 PM, Peter Maydell wrote:
> On some hosts (eg Ubuntu Bionic) pkg-config returns a set of
> libraries for gio-2.0 which don't actually work when compiling
> statically. (Specifically, the returned library string includes
> -lmount, but not -lblkid which -lmount depends upon, so linking
> fails due to missing symbols.)
>
> Check that the libraries work, and don't enable gio if they don't,
> in the same way we do for gnutls.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> I wanted a statically-linked system emulation binary (which, yes,
> I know is not really something we support :-)). I got one with
> suitably liberal use of --disable-foo configure options, and
> this was the only thing I couldn't work around that way.
> The patch is needed because there's no --disable-gio. I suppose
> we could add that instead (or as well)...
> Possibly meson offers a nicer way to do this, but this was
> simple and gnutls is doing the check this way already.
> ---
> configure | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 00/10] target/arm: Various v8.1M minor features
@ 2020-10-12 15:33 Peter Maydell
2020-10-12 15:33 ` [PATCH] configure: Test that gio libs from pkg-config work Peter Maydell
0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2020-10-12 15:33 UTC (permalink / raw)
To: qemu-arm, qemu-devel; +Cc: Richard Henderson
This patchseries implements various minor v8.1M new features,
notably the branch-future and low-overhead-loop extensions.
(None of this will get enabled until we have enough to implement
a CPU model which has v8.1M, which will be the Cortex-M55, but
as usual we can get stuff into the tree gradually.)
Patch 1 is a decodetree fix suggested by Richard that is
necessary to avoid wrong-decode of the changes to t32.decode
by later patches.
thanks
-- PMM
Peter Maydell (10):
decodetree: Fix codegen for non-overlapping group inside overlapping
group
target/arm: Implement v8.1M NOCP handling
target/arm: Implement v8.1M conditional-select insns
target/arm: Make the t32 insn[25:23]=111 group non-overlapping
target/arm: Don't allow BLX imm for M-profile
target/arm: Implement v8.1M branch-future insns (as NOPs)
target/arm: Implement v8.1M low-overhead-loop instructions
target/arm: Fix has_vfp/has_neon ID reg squashing for M-profile
target/arm: Implement FPSCR.LTPSIZE for M-profile LOB extension
target/arm: Fix writing to FPSCR.FZ16 on M-profile
target/arm/cpu.h | 7 ++
target/arm/m-nocp.decode | 10 ++-
target/arm/t32.decode | 50 +++++++----
target/arm/cpu.c | 34 ++++---
target/arm/translate.c | 157 +++++++++++++++++++++++++++++++++
target/arm/vfp_helper.c | 30 +++++--
scripts/decodetree.py | 2 +-
target/arm/translate-vfp.c.inc | 17 +++-
8 files changed, 268 insertions(+), 39 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] configure: Test that gio libs from pkg-config work
2020-10-12 15:33 [PATCH 00/10] target/arm: Various v8.1M minor features Peter Maydell
@ 2020-10-12 15:33 ` Peter Maydell
0 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2020-10-12 15:33 UTC (permalink / raw)
To: qemu-arm, qemu-devel; +Cc: Richard Henderson
On some hosts (eg Ubuntu Bionic) pkg-config returns a set of
libraries for gio-2.0 which don't actually work when compiling
statically. (Specifically, the returned library string includes
-lmount, but not -lblkid which -lmount depends upon, so linking
fails due to missing symbols.)
Check that the libraries work, and don't enable gio if they don't,
in the same way we do for gnutls.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
I wanted a statically-linked system emulation binary (which, yes,
I know is not really something we support :-)). I got one with
suitably liberal use of --disable-foo configure options, and
this was the only thing I couldn't work around that way.
The patch is needed because there's no --disable-gio. I suppose
we could add that instead (or as well)...
Possibly meson offers a nicer way to do this, but this was
simple and gnutls is doing the check this way already.
---
configure | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index e8e8e984f24..cd79227d763 100755
--- a/configure
+++ b/configure
@@ -3762,13 +3762,21 @@ if test "$static" = yes && test "$mingw32" = yes; then
fi
if $pkg_config --atleast-version=$glib_req_ver gio-2.0; then
- gio=yes
gio_cflags=$($pkg_config --cflags gio-2.0)
gio_libs=$($pkg_config --libs gio-2.0)
gdbus_codegen=$($pkg_config --variable=gdbus_codegen gio-2.0)
if [ ! -x "$gdbus_codegen" ]; then
gdbus_codegen=
fi
+ # 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
+ gio=yes
+ else
+ gio=no
+ fi
else
gio=no
fi
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-10-19 13:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28 16:04 [PATCH] configure: Test that gio libs from pkg-config work Peter Maydell
2020-09-28 16:42 ` Paolo Bonzini
2020-10-19 11:16 ` Peter Maydell
2020-10-19 13:26 ` Paolo Bonzini
2020-10-19 11:27 ` Philippe Mathieu-Daudé
-- strict thread matches above, loose matches on Subject: below --
2020-10-12 15:33 [PATCH 00/10] target/arm: Various v8.1M minor features Peter Maydell
2020-10-12 15:33 ` [PATCH] configure: Test that gio libs from pkg-config work Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).