qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 07/15] QEMU_PACKED: Remove gcc_struct attribute in Windows non x86 targets
Date: Tue,  7 May 2019 13:00:03 +0100	[thread overview]
Message-ID: <20190507120011.18100-8-peter.maydell@linaro.org> (raw)
In-Reply-To: <20190507120011.18100-1-peter.maydell@linaro.org>

From: Cao Jiaxi <driver1998@foxmail.com>

gcc_struct is for x86 only, and it generates an warning on ARM64 Clang/MinGW targets.

Signed-off-by: Cao Jiaxi <driver1998@foxmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20190503003618.10089-1-driver1998@foxmail.com
[PMM: dropped the slirp change as slirp is now a submodule]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 contrib/libvhost-user/libvhost-user.h | 2 +-
 include/qemu/compiler.h               | 2 +-
 scripts/cocci-macro-file.h            | 7 ++++++-
 3 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/contrib/libvhost-user/libvhost-user.h b/contrib/libvhost-user/libvhost-user.h
index 414ceb0a2f9..78b33306e81 100644
--- a/contrib/libvhost-user/libvhost-user.h
+++ b/contrib/libvhost-user/libvhost-user.h
@@ -148,7 +148,7 @@ typedef struct VhostUserInflight {
     uint16_t queue_size;
 } VhostUserInflight;
 
-#if defined(_WIN32)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
 # define VU_PACKED __attribute__((gcc_struct, packed))
 #else
 # define VU_PACKED __attribute__((packed))
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 296b2fd5727..09fc44cca45 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -28,7 +28,7 @@
 
 #define QEMU_SENTINEL __attribute__((sentinel))
 
-#if defined(_WIN32)
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
 # define QEMU_PACKED __attribute__((gcc_struct, packed))
 #else
 # define QEMU_PACKED __attribute__((packed))
diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h
index e485cdccae8..c6bbc05ba3e 100644
--- a/scripts/cocci-macro-file.h
+++ b/scripts/cocci-macro-file.h
@@ -23,7 +23,12 @@
 #define QEMU_NORETURN __attribute__ ((__noreturn__))
 #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
 #define QEMU_SENTINEL __attribute__((sentinel))
-#define QEMU_PACKED __attribute__((gcc_struct, packed))
+
+#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
+# define QEMU_PACKED __attribute__((gcc_struct, packed))
+#else
+# define QEMU_PACKED __attribute__((packed))
+#endif
 
 #define cat(x,y) x ## y
 #define cat2(x,y) cat(x,y)
-- 
2.20.1



  parent reply	other threads:[~2019-05-07 12:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07 11:59 [Qemu-devel] [PULL 00/15] target-arm queue Peter Maydell
2019-05-07 11:59 ` [Qemu-devel] [PULL 01/15] pc: Rearrange pc_system_firmware_init()'s legacy -drive loop Peter Maydell
2019-05-07 11:59 ` [Qemu-devel] [PULL 02/15] pflash_cfi01: New pflash_cfi01_legacy_drive() Peter Maydell
2019-05-07 11:59 ` [Qemu-devel] [PULL 03/15] hw/arm/virt: Support firmware configuration with -blockdev Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 04/15] hw/arm/raspi: Diagnose requests for too much RAM Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 05/15] arm: Allow system registers for KVM guests to be changed by QEMU code Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 06/15] arm: aspeed: Set SDRAM size Peter Maydell
2019-05-07 12:00 ` Peter Maydell [this message]
2019-05-07 12:00 ` [Qemu-devel] [PULL 08/15] qga: Fix mingw compilation warnings on enum conversion Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 09/15] util/cacheinfo: Use uint64_t on LLP64 model to satisfy Windows ARM64 Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 10/15] osdep: Fix mingw compilation regarding stdio formats Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 11/15] hw/arm/armv7m_nvic: Check subpriority in nvic_recompute_state_secure() Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 12/15] hw/intc/armv7m_nvic: NS BFAR and BFSR are RAZ/WI if BFHFNMINS == 0 Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 13/15] hw/intc/armv7m_nvic: Don't enable ARMV7M_EXCP_DEBUG from reset Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 14/15] target/arm: Implement XPSR GE bits Peter Maydell
2019-05-07 12:00 ` [Qemu-devel] [PULL 15/15] target/arm: Stop using variable length array in dc_zva Peter Maydell
2019-05-08 13:20 ` [Qemu-devel] [PULL 00/15] target-arm queue Peter Maydell

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=20190507120011.18100-8-peter.maydell@linaro.org \
    --to=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).