From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Roque Arcudia Hernandez <roqueh@google.com>
Cc: jansene@google.com, sw@weilnetz.de, peterx@redhat.com,
farosas@suse.de, lvivier@redhat.com, pbonzini@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [PATCH] sysemu/os-win32.h: Windows clang-cl compiler fixes
Date: Mon, 4 Nov 2024 09:18:16 +0000 [thread overview]
Message-ID: <ZyiRWPssVKTpJBql@redhat.com> (raw)
In-Reply-To: <20241101214101.3376595-1-roqueh@google.com>
On Fri, Nov 01, 2024 at 09:41:01PM +0000, Roque Arcudia Hernandez wrote:
> This contains a series of small compiler fixes to enable the compilation
> of qemu using clang-cl.
>
> It mainly involves adding some missing header files and updating #ifdefs
> to handle clang-cl specific things.
>
> Signed-off-by: Erwin Jansen <jansene@google.com>
> Signed-off-by: Roque Arcudia Hernandez <roqueh@google.com>
> ---
> include/qemu/compiler.h | 3 ++-
> include/sysemu/dma.h | 2 ++
> include/sysemu/os-win32.h | 2 +-
> migration/savevm.c | 2 ++
> tests/qtest/libqtest.c | 2 +-
> 5 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
> index c06954ccb4..7f532fe660 100644
> --- a/include/qemu/compiler.h
> +++ b/include/qemu/compiler.h
> @@ -22,7 +22,8 @@
> #define QEMU_EXTERN_C extern
> #endif
>
> -#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
> +#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) && \
> + !defined(__clang__)
> # define QEMU_PACKED __attribute__((gcc_struct, packed))
> #else
> # define QEMU_PACKED __attribute__((packed))
We must use the 'gcc_struct' format for packing on Windows
to preserve the correct ABI.
clang doesn't support this yet, which is why we don't permit
use of clang on Windows platforms at this time.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2024-11-04 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 21:41 [PATCH] sysemu/os-win32.h: Windows clang-cl compiler fixes Roque Arcudia Hernandez
2024-11-04 9:18 ` Daniel P. Berrangé [this message]
2024-11-04 10:08 ` Philippe Mathieu-Daudé
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=ZyiRWPssVKTpJBql@redhat.com \
--to=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=jansene@google.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=roqueh@google.com \
--cc=sw@weilnetz.de \
/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).