From patchwork Tue Nov 26 21:17:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 845619 Delivered-To: patch@linaro.org Received: by 2002:a5d:6989:0:b0:382:43a8:7b94 with SMTP id g9csp460243wru; Tue, 26 Nov 2024 13:18:59 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWe2YiDpP5xcW6aaQlJ3rKy83MQZe/QfeqDhii4NuKj1+lvuKuEjYluzszIMiedldzcbglKTQ==@linaro.org X-Google-Smtp-Source: AGHT+IGa9sfjVK2VCB6o7nJukGeIMCZhQ67RgGo8p4So2vgIPlvvN+fCKE+XqFM5MkOF7/0U+EYW X-Received: by 2002:a05:6214:4007:b0:6d4:10fd:3a36 with SMTP id 6a1803df08f44-6d8645b9d9amr11327936d6.7.1732655938955; Tue, 26 Nov 2024 13:18:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732655938; cv=none; d=google.com; s=arc-20240605; b=MjWIgIKA/THiB053kjntRHLcXDy0YMMD0y87ffNL4SzEG+U5ce/ethkAKAPan3gkpp CU3HHWeGM/q6RCXAyfEX1I+wBF1Wem7NovOo+JCPZCFlMWKm0QklJLbN5hH98vW/zHI8 Mw54QqzJ5ZHbn7LTbfqes+bVpj6RIitT723zMYMFnLEHSP7GD/9tAmsEESk95LFWYVQJ zn27FBKZrRy/wFOQ7PuOSNUzeaZWczBGssJcLjKbpdDTu8FzZyyXWAG3H9kUwyqLc/jg 3y5DVQbE+C/ImsZJnWm2Zu9m9zjHsGwjZtiFnUfX4xZg/8pfyQzRSjsfc21yGb6shYFW 9PAw== 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=+MKlsc9XcOWYZdd66SFqnK/oWgGYy892pfPxX1s7X5Q=; fh=Wl5FFhkP2+p5s9Jt2/9UUpf5mrHiqOccw0kBq0/IT2c=; b=TJj0pk8/3yLRlS634emWRE4k9eaLpOnfR5VKvtB4I8wDJuR/lS41tpLQi/TZ8/D64s Zbb2LPNEGDF8bREWeFq/9glJFRbCauCyw9Pm6bfRjMmS+5rX1aH5VN+GUW2isUFjekSy MrCVSRTXG7uFYtmiJKCmhBL7d17+dhA/olJuwP+C7Ma1oFLZ35tVlxGnJDaewb+Re7Mz SbJFtNGImivJcnGI7EiPVq1gLzQ+BEMYVHW6ZvIxeeLXHfaFMjvxJCmeG9AaGV/PK2yK GXbIdCKZDlrD/tYhAwhMtcBR5htX5NGAay27MOvnq5CSd+NeDU12+2HUttj0tHew0MEM 6nPA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BvMyNR86; 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 6a1803df08f44-6d451a99b43si133669616d6.153.2024.11.26.13.18.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Nov 2024 13:18:58 -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=BvMyNR86; 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 1tG2wf-0001VF-Hm; Tue, 26 Nov 2024 16:18:05 -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 1tG2wd-0001Um-Uf for qemu-devel@nongnu.org; Tue, 26 Nov 2024 16:18:03 -0500 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tG2wb-0001aU-Vx for qemu-devel@nongnu.org; Tue, 26 Nov 2024 16:18:03 -0500 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-7252b5d7b1dso143290b3a.0 for ; Tue, 26 Nov 2024 13:18:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1732655880; x=1733260680; 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=+MKlsc9XcOWYZdd66SFqnK/oWgGYy892pfPxX1s7X5Q=; b=BvMyNR86fYtpolW1ILqOgB4PmZAPEFPvfAFUldx/AO5eczJPsZmN6u/yY6SlCKGIdE eZDqTSlXGOkqkOQrwObypjyj6GJhEvBkNEqRyHdvOYRdb6e8PGN/BfrDALfDww0LhFGo oFAYd5fld9vOPrAL/tVA9kHkSVqi5ZbN8PLdw04VS2jt3ofxYYjohzViKDcJ0dM7JKnW iXQeExmbt1XESXNyQQYbn6c2ayKUwZAD9od3dYQcOO2HSIN2tNdEMB1XRlz4W8ZaAEx1 M3pfe3MUzwiC1Uk2XOBiuasvFiho5iymvhG9/na+at4ytdoq3VJCDoY46owH4yj35hR7 GoTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732655880; x=1733260680; 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=+MKlsc9XcOWYZdd66SFqnK/oWgGYy892pfPxX1s7X5Q=; b=hCv0g1ceeD290ZawAWfLOGX1nOZC2cb722qAxKQRPMqXmnOEwANJasdTYcz68GAR36 Ncw9IkshevVoAIHllvTnL8JIuhfjB3BNFdiz4xUu6zsUuZkbEUW1s6ZnY17ewNwroM+q CQrpsmuqBBwMaAMfRGQ5I33STo8KwbiLx2tq+22i36cofHO7OqZlBRLCJU+Bq4+92g0Z nETsfHpQl3sxyso5QXyo2skppO4BHJoo1+YRJVDqP6lg2EZmkFlyL/93RCjmfvxsDxwg Vul2l6tdFIcxRU0jxcMcvPFlydyTQ/Ecglg/qKlel4t7GfRqGbHthlMoFvDCQIMlLeWl Uyeg== X-Gm-Message-State: AOJu0YyHNWF6Q0/syT6YdbEXbIklTbwLOFf/6AmX0CaRI/+LxgS58xde 71j6omQVzPU5OkAMj1orlq6ZItlTJg0hsRxBShSk0vFWazenyrOwQ90NL6dw5efbWzeS6laBw6k 59i4= X-Gm-Gg: ASbGnctoKP7KCCs1ykQsWQTW4Jdlm3pVNYe44di1TEvfIL+UzvA4uBlTOZQuyyApICa w2pCyPt4eSspFQ5ffITsW+4TTU/lOM13dUzzly28IKIDyCrOyXx4UgOvkIaQdylbzliFP2tFnT8 YZXgDy0S9R6ZNxLzTuq0l5PFEZ0nJ1rtqxHYF1k4fUEbS6a7lbOMFMFXOoCUZn97Rq6ryfo78yg YIVQS+wZl0Qrn1mdyxAIXap7A/plIvvu9NJ2mrPBnJkwVz4LXrb/svvmdqP6nocYbei/K0q/2Ll GeUsP40MTzRrgQ== X-Received: by 2002:aa7:8a13:0:b0:724:e3e4:a9c7 with SMTP id d2e1a72fcca58-7251ccbb9e9mr5909898b3a.2.1732655880155; Tue, 26 Nov 2024 13:18:00 -0800 (PST) Received: from linaro.. (216-180-64-156.dyn.novuscom.net. [216.180.64.156]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724fd95ed01sm5811766b3a.8.2024.11.26.13.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 13:17:59 -0800 (PST) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Stefano Garzarella , "Michael S. Tsirkin" , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , =?utf-8?q?Marc?= =?utf-8?q?-Andr=C3=A9_Lureau?= , Pierrick Bouvier , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Markus Armbruster , Mahmoud Mandour , Paolo Bonzini , Alexandre Iooss Subject: [PATCH v2 0/3] Enable clang build on Windows Date: Tue, 26 Nov 2024 13:17:33 -0800 Message-Id: <20241126211736.122285-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::432; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pf1-x432.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. 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 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 | 10 ++++++++++ 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, 38 insertions(+), 26 deletions(-)