qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandar Rikalo <Aleksandar.Rikalo@syrmia.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"berrange@redhat.com" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Petar Jovanovic" <petar.jovanovic@syrmia.com>,
	"Vince.DelVecchio@mediatek.com" <Vince.DelVecchio@mediatek.com>,
	"Filip Vidojevic" <Filip.Vidojevic@Syrmia.com>
Subject: Re: [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C"
Date: Thu, 15 Apr 2021 16:21:23 +0000	[thread overview]
Message-ID: <VI1PR0302MB3486A5C79C9B6DC235B381749C4D9@VI1PR0302MB3486.eurprd03.prod.outlook.com> (raw)
In-Reply-To: <847ddb28-7dd6-58c3-b9c6-facecee6e133@amsat.org>

[-- Attachment #1: Type: text/plain, Size: 2737 bytes --]

Hi Paolo,

Can you specify how to reproduce the issue ? We need more details about environment.

In my case, everything seems to work fine for the newest version of glib (2.68).

Thank you,
Aleksandar

> qemu/osdep.h is quite special in that, despite being part of QEMU sources,
> it is included by C++ source files as well.
>
> disas/nanomips.cpp is doing so within an 'extern "C"' block, which breaks
> with latest glib due to the inclusion of templates in glib.h.
>
> These patches implement Daniel Berrangé's idea of pushing the 'extern "C"'
> block within glib.h and including system headers (including glib.h,
> and in fact QEMU's own glib-compat.h too) *outside* the block.
>
> (CI has not finished running yet, but it seems encouraging).
>
> Paolo
>
> Paolo Bonzini (2):
>   osdep: include glib-compat.h before other QEMU headers
>   osdep: protect qemu/osdep.h with extern "C"
>
>  disas/nanomips.cpp      |  2 +-
>  include/qemu/compiler.h |  6 ++++++
>  include/qemu/osdep.h    | 13 +++++++++++--
>  3 files changed, 18 insertions(+), 3 deletions(-)
>
> --
> 2.30.1
________________________________
From: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com> on behalf of Philippe Mathieu-Daudé <f4bug@amsat.org>
Sent: Tuesday, April 13, 2021 5:58 PM
To: Paolo Bonzini <pbonzini@redhat.com>; qemu-devel@nongnu.org <qemu-devel@nongnu.org>
Cc: peter.maydell@linaro.org <peter.maydell@linaro.org>; berrange@redhat.com <berrange@redhat.com>; Aleksandar Rikalo <Aleksandar.Rikalo@syrmia.com>; Vince.DelVecchio@mediatek.com <Vince.DelVecchio@mediatek.com>; Petar Jovanovic <petar.jovanovic@syrmia.com>; Filip Vidojevic <Filip.Vidojevic@Syrmia.com>
Subject: Re: [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C"

Cc'ing MediaTek reviewers.

On 4/13/21 1:37 PM, Paolo Bonzini wrote:
> qemu/osdep.h is quite special in that, despite being part of QEMU sources,
> it is included by C++ source files as well.
>
> disas/nanomips.cpp is doing so within an 'extern "C"' block, which breaks
> with latest glib due to the inclusion of templates in glib.h.
>
> These patches implement Daniel Berrangé's idea of pushing the 'extern "C"'
> block within glib.h and including system headers (including glib.h,
> and in fact QEMU's own glib-compat.h too) *outside* the block.
>
> (CI has not finished running yet, but it seems encouraging).
>
> Paolo
>
> Paolo Bonzini (2):
>   osdep: include glib-compat.h before other QEMU headers
>   osdep: protect qemu/osdep.h with extern "C"
>
>  disas/nanomips.cpp      |  2 +-
>  include/qemu/compiler.h |  6 ++++++
>  include/qemu/osdep.h    | 13 +++++++++++--
>  3 files changed, 18 insertions(+), 3 deletions(-)
>


[-- Attachment #2: Type: text/html, Size: 5292 bytes --]

      reply	other threads:[~2021-04-15 17:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-13 11:37 [PATCH 0/2] osdep: allow including qemu/osdep.h outside extern "C" Paolo Bonzini
2021-04-13 11:37 ` [PATCH 1/2] osdep: include glib-compat.h before other QEMU headers Paolo Bonzini
2021-04-13 11:37 ` [PATCH 2/2] osdep: protect qemu/osdep.h with extern "C" Paolo Bonzini
2021-04-13 12:00   ` Peter Maydell
2021-04-13 11:48 ` [PATCH 0/2] osdep: allow including qemu/osdep.h outside " no-reply
2021-04-13 15:58 ` Philippe Mathieu-Daudé
2021-04-15 16:21   ` Aleksandar Rikalo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=VI1PR0302MB3486A5C79C9B6DC235B381749C4D9@VI1PR0302MB3486.eurprd03.prod.outlook.com \
    --to=aleksandar.rikalo@syrmia.com \
    --cc=Filip.Vidojevic@Syrmia.com \
    --cc=Vince.DelVecchio@mediatek.com \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=petar.jovanovic@syrmia.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).