From nobody Tue Apr 7 21:43:42 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1773242001; cv=none; d=zohomail.com; s=zohoarc; b=VflYJOHTNc4qwlyP52rfSgeLHiVA/nLSYM2Y8eo9b029RE6XAhtA7/0Hq3EaWdoTX4vKUePUeRNrMcfV4TCzg2V0cFR4+EXpO3aMxIo7aod9q+3r4CkEx1ybUqCHdO6+4y5bZ1Wn6cMFUjk+u17Lv9HjiSilDGEf/ZcybZnveNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773242001; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=K4ewQZcyWaqxFxbjWgw89qUjx6zwGLruGy4Pg7GfB8U=; b=GXU1yqCbGWx6LqXH52rEqZeIL3RKzkq8G0uFKtHxPpPzm6raRrnCykgpN3hu6p3vyBZLIxuOPbc5I1sY3Jz8/fNJC+xdX8hVXINtfRWxMaI3NIj/6CqLqi6QShjuwB+n+jvarW/4Iht14Mjt6xn9aCxpM1LUz1hU/2deA+1zEKM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17732420016971007.4353157389445; Wed, 11 Mar 2026 08:13:21 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w0LBi-0000xm-KX; Wed, 11 Mar 2026 11:09:31 -0400 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 1w0L9E-0003tM-SV; Wed, 11 Mar 2026 11:07:03 -0400 Received: from isrv.corpit.ru ([212.248.84.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w0L9B-0004rg-PG; Wed, 11 Mar 2026 11:06:56 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 06FCC191E85; Wed, 11 Mar 2026 18:04:41 +0300 (MSK) Received: from think4mjt.tls.msk.ru (mjtthink.wg.tls.msk.ru [192.168.177.146]) by tsrv.corpit.ru (Postfix) with ESMTP id E79AB37C2C6; Wed, 11 Mar 2026 18:05:18 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tls.msk.ru; s=202602; t=1773241481; bh=UkC+mGEKAng2ipeWdHY5FpVi3rpU3TW2kt6s+TMUcoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gzb362OQhDRH2ecmPSVG6HKVd8iiL/C4ly66rqb8wViTol3t+134CrOQPp/nLrdOR kl+HbJJfSIdDbEaooz5QLJ9G6vc0CDX0yDkligOHDOIL0eXwEbll7gQxTnLHVQlqFi ifvilpcxy2ESmtjdvI76XkqKnrCDhFymodSWdk3uiKQvb7RYnE3BABtXJ+hYSPaNk5 8p1SX3G3MmwPDUjFNjFc4B2f8MdMzJ8qcanegYduYLUFBRdHTcKqBWysY1ddzFnRF8 MmrgpQy7N7xqk/ncTlRltOsk4qKxygTmeXtrcEdAoioViZmfZ42jKo9i9qrZ4lFsB8 OUhhMrK5exChw== From: Michael Tokarev To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, Mohamed Mediouni , Pierrick Bouvier , Michael Tokarev Subject: [Stable-10.1.5 02/46] plugins: fix cross-build using LLVM for Windows targets Date: Wed, 11 Mar 2026 18:02:38 +0300 Message-ID: <20260311150327.1084669-2-mjt@tls.msk.ru> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=212.248.84.144; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -2 X-Spam_score: -0.3 X-Spam_bar: / X-Spam_report: (-0.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.819, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.903, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @tls.msk.ru) X-ZM-MESSAGEID: 1773242003618158500 Content-Type: text/plain; charset="utf-8" From: Mohamed Mediouni llvm-dlltool assumes that it's by default targeting the host architecture it's running on. That assumption doesn't hold true when cross-compiling. Signed-off-by: Mohamed Mediouni Reviewed-by: Pierrick Bouvier Tested-by: Pierrick Bouvier Link: https://lore.kernel.org/qemu-devel/20260210040722.11375-1-mohamed@unp= redictable.fr Signed-off-by: Pierrick Bouvier (cherry picked from commit b0353beebb0c4fa4059c88362561a8362ada8b4c) Signed-off-by: Michael Tokarev diff --git a/plugins/meson.build b/plugins/meson.build index 62c991d87f..222aed8c2e 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -41,9 +41,16 @@ if host_os =3D=3D 'windows' # to find missing symbols in current program. win32_qemu_plugin_api_link_flags =3D ['-Lplugins', '-lqemu_plugin_api'] if meson.get_compiler('c').get_id() =3D=3D 'clang' + if host_machine.cpu() =3D=3D 'x86_64' + dlltool_target =3D 'i386:x86-64' + elif host_machine.cpu() =3D=3D 'aarch64' + dlltool_target =3D 'arm64' + else + error('Unknown machine') + endif # With LLVM/lld, delaylib is specified at link time (-delayload) dlltool =3D find_program('llvm-dlltool', required: true) - dlltool_cmd =3D [dlltool, '-d', '@INPUT@', '-l', '@OUTPUT@', '-D', 'qe= mu.exe'] + dlltool_cmd =3D [dlltool, '-m', dlltool_target,'-d', '@INPUT@', '-l', = '@OUTPUT@', '-D', 'qemu.exe'] win32_qemu_plugin_api_link_flags +=3D ['-Wl,-delayload=3Dqemu.exe'] else # With gcc/ld, delay lib is built with a specific delay parameter. --=20 2.47.3