From patchwork Fri Jan 10 20:33:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 856289 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp416356wrc; Fri, 10 Jan 2025 12:35:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW0620ttJvZHBS6CgwsJKApVFIPjZQ8D6wo1jT274VIQ5nNVbP3zdF5R6Rh0HeLfREkcxpbBQ==@linaro.org X-Google-Smtp-Source: AGHT+IFqp2IMGaRJn7rTKHYAoTcEoPx/KA0NgSYmVwajvXsiLpT8JhLngl5nxjzT5A3fxoyFjzqd X-Received: by 2002:a05:620a:488a:b0:7b6:dc4f:8879 with SMTP id af79cd13be357-7bcd97c6fa9mr2082395285a.47.1736541345492; Fri, 10 Jan 2025 12:35:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736541345; cv=none; d=google.com; s=arc-20240605; b=ikwR4wqSN1wU0UEWuiEUIbAvLZB3pklXutICSnyG/UmVtYE7gGuHwrDC26Xn8qVoyj vzAbWfyUEsS2d9FGEeKhzVswbOUPhfF/vXbTuYYN1qFU7aTXXlImQKdj7oTZBWbs1UFz c0F1LUDK5qSqdTXZ8iHh0pPHgwzDt8284R3QVe65JjBsI0rOW0JtxsyMs/adkRfN/qBA BOu7Hn1RQ6uzIYOzBAS4DmHgYHmDIdP5OYYKvjX59qDoEOimz7LkWTE+uMYHmZI+Srdx dnpx1g4nE58yfHY9oG5S3NMPtVC3eSmFBIHyhIg5YS4GqUwJdFj7i2CNGTYCdyhSFthk EJVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=2wVgW4ZcjXo//dfpFkDwXhNPgQ5kohxBC90Lc3HtqlM=; fh=UEetNBE2p2bu6errUCGbv3jJ3gSRLYgjO+j9vdmIBjw=; b=h3z9RxvmUukEtRyjKEeFIdSFxZ7F35sk4K5lpRFOWxRmQzXo6FafJZKyw4CWNSiB+2 zu3pKvDIPaWNpQugXkq15rgLxosjrft7Rkl3tN/zJ4uoeZ+eUSqyJqERbM6JC8MFzjVD chjBuyJDPmQO0fc1OZDvX6CCwaxVtvAaTT2pMYORXR+lfOPJxMB9NZHoTxgTdVnFob8I 9GYOMGfImKPfPCwQMSZHRW7mdVu4xW9ZNAzfIXjU2OcfSOrxVvQS2b+W0YuH6YXpJIio Byf4jY/NVybvBBzNSVYreNlWg1+ZSUucM+xGZ+zCXbkciDOIY/d6sdNltuq4dFYDMIlB qS8A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WPtdoOJ8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7bce33077aasi522621585a.348.2025.01.10.12.35.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jan 2025 12:35:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WPtdoOJ8; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWLhy-0000Va-0F; Fri, 10 Jan 2025 15:34:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tWLhv-0000VA-HN for qemu-devel@nongnu.org; Fri, 10 Jan 2025 15:34:15 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWLht-0005eu-JP for qemu-devel@nongnu.org; Fri, 10 Jan 2025 15:34:15 -0500 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-2163dc5155fso45108685ad.0 for ; Fri, 10 Jan 2025 12:34:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736541251; x=1737146051; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2wVgW4ZcjXo//dfpFkDwXhNPgQ5kohxBC90Lc3HtqlM=; b=WPtdoOJ8vEaKI1gYluPw508TM+vDJf3ZtIMUDDomfjDtKunlS20ApIJhOUySk6vF+Z 4qWOV3+mnPaZVqJy2Ge9ABPH/M36uPoFW5k9bjHyTOlhIGyRGffmXF1D0gUSJxohAJdE C+b3/T2Ojhj0DmlAasCh2NrDNRDKt916qxj227a9RjsyshPp+LRci2cefm7JeAjrQHr5 OiddSwqBUKcTIarBTMHaMvL6bBF3fnUumwH9hUNQKCm0e0bE7FvEVk6Aw+WDb+mtj7LV DrNWvfub3Uw/DXqYaB7gvJ7D7Wl7G0bMqW7osoXvM4Xn7uc4cMEJSdQoi5KvRz17IJYe /Ssw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736541251; x=1737146051; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2wVgW4ZcjXo//dfpFkDwXhNPgQ5kohxBC90Lc3HtqlM=; b=lxaye9hy2zrtrmfpmDTZb7eGnKRwYz1/HIdjlyqFFlkiAy+3vEA9ya8U4l60+HIOyy nOq2YPaqQAnxMATxn5VLQrsHJvqHjAkgHfCLROe1vji4z0jG8Xs+ESXDLHDGdcLi6Vps dKv+z7i98a5lklhfZ3F4D6mrHZQU/MJuA+mVen68QsfkNbwn8ylapiDiVRC+D10/xy37 bLttum0xXe0Aiy7ZfJrzKnpHLaQj6wwxxcEzDRv+FV1LypkHmc3k82JewQPpDwxUvcsG caWeCNplqeuvhlJciAnsLTxBUuqarN5nwmafms57PZ5AZh/0utHl34L/jE51WZfdns1X Fr9Q== X-Gm-Message-State: AOJu0Yzsj7ZnwEK6Rr7ZOyXHUUdbbYjFoO37KA6inyKx/hUZRVoBK7Vi eICs99FkTfPywM9fDMKWi2I/FGVjunaibevMaRJs8+hlIHfOM7KQk5e6hq/AYRNuV/eDsoND16r bZfaGnA== X-Gm-Gg: ASbGncvWCRMKir1yiwtgNKc91RcCvsFM4+dTMluaLog1no4ZRyNue/S8cO/3jkbxj4C ZSAQ8EudUH5y4pRzaaUgKhYDj3kb0oJTPi7zeKCQ8xYKOPiydfrwZajxikegEjkXqgHvqRTb4Iv Zvp+v40OAiX3A15TOdEtDOz1bvkUAQ9Ga54KVm7n6pRNiEzU7/5UXXWUWermW08GE5ABf05XbDJ tQnThcXVlXFV4PL16hT/wft77OwxbQtzkO09P80kOXMssa5kjQ8goeF X-Received: by 2002:a05:6a21:3a87:b0:1e0:c56f:7daf with SMTP id adf61e73a8af0-1e88cf7f7bdmr19435304637.6.1736541251316; Fri, 10 Jan 2025 12:34:11 -0800 (PST) Received: from pc.. ([38.39.164.180]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-a318e8ecacfsm3215947a12.38.2025.01.10.12.34.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 12:34:10 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Mahmoud Mandour , Markus Armbruster , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , Paolo Bonzini , Pierrick Bouvier , Stefano Garzarella , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , "Michael S. Tsirkin" , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Alexandre Iooss Subject: [PATCH v4 0/3] Enable clang build on Windows Date: Fri, 10 Jan 2025 12:33:58 -0800 Message-Id: <20250110203401.178532-1-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62a; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org For now, it was only possible to build plugins using GCC on Windows. However, windows-aarch64 only supports Clang. This biggest roadblock was to get rid of gcc_struct attribute, which is not supported by Clang. After investigation, we proved it was safe to drop it. Built and tested on Windows (all msys env)/Linux/MacOS for x86_64 and aarch64 hosts. v1 contained warning fixes and various bits that have been upstreamed already. The only bits left in this series are the gcc_struct removal, and fixing the plugins build with clang. This series is for 10.0, as we decided to not include the gcc_struct removal is 9.2 release. All patches are now reviewed, so this series can be pulled. I'll report that to MSYS2 too, so we can enable clang environments for QEMU. v1: https://patchew.org/QEMU/20241031040426.772604-1-pierrick.bouvier@linaro.org/ v2: - drop attribute gcc_struct instead of using -mno-ms-bitfields option - add a section about bitfields in documentation v3: - explain why gcc_struct attribute matters in packed structs in commit message - reword the bitfields documentation with suggestions given v4: - edit for bitfields doc requested by Philippe Pierrick Bouvier (3): win32: remove usage of attribute gcc_struct docs/devel/style: add a section about bitfield, and disallow them for packed structures plugins: enable linking with clang/lld docs/devel/style.rst | 20 +++++++++++++++++++ meson.build | 6 +++--- include/qemu/compiler.h | 7 +------ scripts/cocci-macro-file.h | 6 +----- subprojects/libvhost-user/libvhost-user.h | 6 +----- contrib/plugins/meson.build | 2 +- plugins/meson.build | 24 +++++++++++++++++++---- tests/tcg/plugins/meson.build | 3 +-- 8 files changed, 48 insertions(+), 26 deletions(-)