From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503831; cv=none; d=zohomail.com; s=zohoarc; b=hFBTA5a+Co3Spf3wf9Re78o234xijOSX22lwzyHtjk61VsJUmemep7gu5QylW7j4BEdckfwhrxmuhMYSAYVUhlgw3Q4TfmYFWr81amsX+Ydq341fsRx41dLD5lFXrxF71B5skq/ezbtNPvA1WSWeSz6dS1S0kOs9M5wzlsws+Xc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503831; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nHEmWVZQoKiBv31d0b1nWAUGSiNgf5i9gDUSz3OTqd8=; b=UXc4Kd8ni+xbcJkk0AAeOleUgXVx0e40wafXQk6Xus8kF5Iwat9MysXaYlwYj4lXK8nLGxB5gW140nDlM26pu/rvYjvmMSYBFj4n401cZTBynkkxP5plszieRw7hkK36wjpLYn9FA7R4VH6NubeCObrfoyEy2ZkJd1oqikeaEBY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598503831197424.7977056553025; Wed, 26 Aug 2020 21:50:31 -0700 (PDT) Received: from localhost ([::1]:52828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9rp-00046y-Tp for importer@patchew.org; Thu, 27 Aug 2020 00:50:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59546) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9r3-0002lA-5h for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:41 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:40556) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9r1-0003gR-O1 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:40 -0400 Received: by mail-pf1-x442.google.com with SMTP id k18so2525174pfp.7 for ; Wed, 26 Aug 2020 21:49:39 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nHEmWVZQoKiBv31d0b1nWAUGSiNgf5i9gDUSz3OTqd8=; b=ayl8lTK3HbdJ2w5DMD+s7vbhyF3kQHWt1OBC459fFYkfQPYtsOiHlWp/hXFOC5j1Uu Fr02t7HNRgfk2N/uqDb5M+joMjkIujQcjDpdhrm5qSnU/PJa7b2srjwhTksrE6kpV2y3 UJdtE9bPL4Vx8D5LlLpQUhAj5rhQp+8kZv/tqBTPpMTngWNwmllzGk8r8deRLM65WxND svlvWWEK11i1HCBXEynEjJ8578mC8nbMTMwuoIBzMQhWT9ZZ0JERR12hvzATlW2aJJwM o+hYfVgsMF+FCxGYnTrkX7eWKHomMi7NFgDaEvneZFOaHNMnLZDXd87BAa/5sJ/LRQMb Ur+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nHEmWVZQoKiBv31d0b1nWAUGSiNgf5i9gDUSz3OTqd8=; b=f+VI+LSf7o/c+qO7zNyxTWfU6fsHnpLWG5MKmhmIiCIvxXtFN9kY49ltGthRTDzmEO /1R8DZPTrb8guflF3bQmFV8vFxsRmasHIARTVMgNa4BRP03u7aKXY2GLD62T6ZZ1rCY4 uyXQiM2w2Xrc1nsUAP0A/1QjbB6mSkLN2fbirlXkU0b2aPvJFXA1vX1DodbOttY8SMc7 3zH//UZH6NlIYHAMakQJJ8aGeobmXuM6T2eLvsRKmBwfWnesCF1GghpquxKTESblogCs mJglJF8t392TPTDxsSYwNo/76rRZCBqTPxpGYOBrRPX3bgXT4tWgaMrY+tq6oU5bNk30 1T0g== X-Gm-Message-State: AOAM531JsFqWCM0tSPGsF8leZvsjGTs+Gyc7tvvbFXUNhHMnopUxsZeF 0/tdnS17O135RKwwbGbEU2yuHldtrx4YMNOuJ3I= X-Google-Smtp-Source: ABdhPJxWICLA5u99WN3jePmnSqiPn33OehnwvNlzu4tur4+OyFe+CR2prFe2L0ugNvlauI12MA9AKg== X-Received: by 2002:a63:6e01:: with SMTP id j1mr13037528pgc.147.1598503777962; Wed, 26 Aug 2020 21:49:37 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja Date: Thu, 27 Aug 2020 12:49:12 +0800 Message-Id: <20200827044917.1356-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo SIMPLE_PATH_RE should match the full path token. Or the $ and : contained in path would not matched if the path are start wi= th C:/ and E:/ Signed-off-by: Yonggang Luo --- scripts/ninjatool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ninjatool.py b/scripts/ninjatool.py index cc77d51aa8..6ca8be6f10 100755 --- a/scripts/ninjatool.py +++ b/scripts/ninjatool.py @@ -55,7 +55,7 @@ else: =20 PATH_RE =3D r"[^$\s:|]+|\$[$ :]|\$[a-zA-Z0-9_-]+|\$\{[a-zA-Z0-9_.-]+\}" =20 -SIMPLE_PATH_RE =3D re.compile(r"[^$\s:|]+") +SIMPLE_PATH_RE =3D re.compile(r"^[^$\s:|]+$") IDENT_RE =3D re.compile(r"[a-zA-Z0-9_.-]+$") STRING_RE =3D re.compile(r"(" + PATH_RE + r"|[\s:|])(?:\r?\n)?|.") TOPLEVEL_RE =3D re.compile(r"([=3D:#]|\|\|?|^ +|(?:" + PATH_RE + r")+)\s*|= .") --=20 2.27.0.windows.1 From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503917; cv=none; d=zohomail.com; s=zohoarc; b=DK/5fYwrvEyM9yz2RIBOKdcdb9CmI+KdjszOXGXWuUfGcrfyXc4YW7tW9rJRSggvR7rqAckuXTO8rF3u2VLYO1vUYBfYARW2IluQeUes5vx4aske/7mj8USkWYfLOatMZztBfCfxvjDR5MUzW8WAUDclr4Am7yPwSi5w00ktF3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503917; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=DvegxkU4yeOp5ywv2Dxl8AaUKETzvC/yyHSY1YNHqjzblyws+Lty+vA9fp0H/tZhgolMT9ky/W9OJ7KWNpu5agj0VXtUmYoDFAmLHeXAjTStDRVKl5VreDS5hCEMnVBLs9ZCWqmpbRmQahxZ0thJV4MbZUk5Xrf7isgITguT8Zo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598503917846117.66100392022884; Wed, 26 Aug 2020 21:51:57 -0700 (PDT) Received: from localhost ([::1]:60730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9tE-0007KZ-Lh for importer@patchew.org; Thu, 27 Aug 2020 00:51:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9r8-0002uj-Di for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:46 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:46108) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9r5-0003gk-Qs for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:46 -0400 Received: by mail-pg1-x544.google.com with SMTP id 31so2446534pgy.13 for ; Wed, 26 Aug 2020 21:49:43 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=C0m1ka4nMOIT8pbURzi32/XLZXhAAVj/llq5s7GnnlYPsVjBuzyUf647/wcrQxfECB shePWwDQBmS9T3WJhd3Oq9/vck9BCmcJvp1sTaf01DHOxtpBF0P1IO6jvf0d6bsux1Wz J8yCj6YDPQl+fmfH5Xssk7FVqq20ijww/51e7SDGo3I80VD3/DNgmSXk4v8wlhP4WFV/ RKJKucHsUr96aQRn9GIPjJwZgSt+lZ88nQEAI7cCFi3FD4c7Tnz3C98iWsvhCBpESsDR zOgK/ILy4yogUhy5sJPpxSzZ/D/3tLjTUFco4n7bIGkbpL22jzdZXtJR6Yoq5R2kYZYc j5sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7+MsaJjYLlKc/kuo4dhCFuDpn67NQClb7RmuHL3RlA8=; b=GPSvHtbkBDJcN6uN2pvaOSMr1eblAa6s5+dRtmfAxHoqGzhcWsnI1Yuciog6knM394 czgKzd6oWOklVQ+owWdP6VMSr7gyS6dHWjtiv1xqhW4bedyClwDojE3Pdy2zHwrBzQyL S629NtGwF9nAesk3/FftdXQ/5mx7i5CzmHrRFmXrMlq/fu4r1SmaZJF4BPQlCscMABYF AGt1l3sZOhZbfV8+tgMDZZmVo0kaUZwxbXVgVHchp9/YD2hzQR5NryR/o2ak5n8FV0jx PK8uBA9clX99DU3a9WlxKzicjwL+Q3s0CPf6gOpXdL1Xw0P29gHNfzT5w788wLKqxOUy otFQ== X-Gm-Message-State: AOAM532PKUT76WjOUs6BjwL3X5SeEJ8yNP9hKjqa+m/AzwaNL0mrTjKt HiwbbOZXjXjtxG7KuCzwcZduF50wzeNdXb7VZiU= X-Google-Smtp-Source: ABdhPJygoErTZpcYOEEZIwnw2ndhPQz3lOJ5nJTBI3YErIW/Z5+AEZKvx+BSQtXWbF/NPceT0FmMFw== X-Received: by 2002:a17:902:bf01:: with SMTP id bi1mr14688209plb.118.1598503781986; Wed, 26 Aug 2020 21:49:41 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 2/6] meson: fixes relpath may fail on win32. Date: Thu, 27 Aug 2020 12:49:13 +0800 Message-Id: <20200827044917.1356-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::544; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo On win32, os.path.relpath would raise exception when do the following relpa= th: C:/msys64/mingw64/x.exe relative to E:/path/qemu-build would fail. So we try catch it for stopping it from raise exception on msys2 Signed-off-by: Yonggang Luo --- scripts/mtest2make.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/mtest2make.py b/scripts/mtest2make.py index bdb257bbd9..d7a51bf97e 100644 --- a/scripts/mtest2make.py +++ b/scripts/mtest2make.py @@ -53,9 +53,16 @@ i =3D 0 for test in json.load(sys.stdin): env =3D ' '.join(('%s=3D%s' % (shlex.quote(k), shlex.quote(v)) for k, v in test['env'].items())) - executable =3D os.path.relpath(test['cmd'][0]) + executable =3D test['cmd'][0] + try: + executable =3D os.path.relpath(executable) + except: + pass if test['workdir'] is not None: - test['cmd'][0] =3D os.path.relpath(test['cmd'][0], test['workdir']) + try: + test['cmd'][0] =3D os.path.relpath(executable, test['workdir']) + except: + test['cmd'][0] =3D executable else: test['cmd'][0] =3D executable cmd =3D '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in= test['cmd']))) --=20 2.27.0.windows.1 From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503842; cv=none; d=zohomail.com; s=zohoarc; b=MpDCeH9hF/KV3MC+ilpJNyGsxM+DP+Ykda5F0v1teaFVT5b923B/1GWm8peKgOV6Oae6TgUkHkzmVy5LONXW2VSiC4GLeYPiiEHsEddKtTn8jpkrvj99t1dX3nhU4YzhLI3pCViwMdxoNvIpV7goW1hbZIlYGLtBq8Kqw7wLcEk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503842; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rIP9TCfc3oqvA8Vp/R/E5MTUabOcrCowAJuIfVAgJrs=; b=c83S3UWWUY4F7QubYyPEJ3yf1K0USpQqsd53VOgyK96XAW0rjpiB8gsFXG6nq+anUOf7crDOJUd4jRnb/xI74KFHn9TpCrSIjaM+ntXLUhGYy2pDvLltThmnrnjbxuFM2zJcifn1IzCh6FEDwMoU6qbnHdWcmZgTb/Tz/H5/o90= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598503842476768.865551116475; Wed, 26 Aug 2020 21:50:42 -0700 (PDT) Received: from localhost ([::1]:54132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9s1-0004hG-5G for importer@patchew.org; Thu, 27 Aug 2020 00:50:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59584) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9rC-00031R-2O for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:50 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:36941) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9rA-0003hF-Eb for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:49 -0400 Received: by mail-pf1-x443.google.com with SMTP id x143so2535425pfc.4 for ; Wed, 26 Aug 2020 21:49:48 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rIP9TCfc3oqvA8Vp/R/E5MTUabOcrCowAJuIfVAgJrs=; b=Lj+7e+M31Jh9HGfacgwlvuk2cowjBdBkec7wQbrdIuxNlLoOXE+zVBSqfHBSGkXP+Y 0kpdipUVzCQkhiSMsr0XYg0loio89MY1CSR5uE3oleWcHX0tUzZAfr5WArCQXocXG+BQ faglqAGKhF31GYN2LA2AUcpwFll0R9EYHHMVfilL+N2lteX5hdH3y2qsT6iwcTo5z7gB ydmpBA165fyvGUEB7oUhUGMXAbVHrX7N/OihHtOrap/OtVPwDystEHGND+IaSflqBC/1 q1w9tUSuRs6/l3pcGUkM7dEMCpQswATCCUpqV+yLM7pQJ/Ok+ddu6erkyKVaPtumH2sV VRRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rIP9TCfc3oqvA8Vp/R/E5MTUabOcrCowAJuIfVAgJrs=; b=HGIEsKSucQAL3Os+O3TUzQTgQH5E3VgvRwIE3FnT1KfhAySuoO7oj9iK4LGVf9/EYd 1EqbUkPVUUcWXSAnK5/5uEvInMGXQuehHvA3/y39DXj2NtEdlUBqS1V1uJc6EcSpMKN3 dsvS0ZRwwe1MgLZO2lv4dc5lqw4tP7llxgYJ7tFQ38Nrws01IWXoXZPK/UhTbczqIUUO VFYzHEXr7AiGVgvzj2QNmWN2JaqLhYXJ+PCk3LiZc3lQCOCLOLP4BH+FghkCgz4X2026 cxGZQOocrdfNnJpQWvmfr2AhxYP/JHX/U9kVXSaAZ8MB4ZQ6cGnxIWHodd1QaQPxP995 NJmQ== X-Gm-Message-State: AOAM5328/7BnK/C/wOd5PMNUNUCP9xWDTrO7tes/W+fExhp66iDFj+// Oe08aBjif/EOFcapSnJ1ruNdlDffwT+v7aLy1kI= X-Google-Smtp-Source: ABdhPJxTfljYwgIutZFgXEfn4gT7GzzEUplBwHPhXaSX6LSFv+N0UibHi/EAGJbMiBuWLM3MeEB+WA== X-Received: by 2002:a63:2482:: with SMTP id k124mr13780529pgk.251.1598503786704; Wed, 26 Aug 2020 21:49:46 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 3/6] meson: Mingw64 gcc doesn't recognize system include_type for sdl2 Date: Thu, 27 Aug 2020 12:49:14 +0800 Message-Id: <20200827044917.1356-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo Fixes this for msys2/mingw64 by remove the include_type for sdl2 discovery = in meson Signed-off-by: Yonggang Luo --- meson.build | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meson.build b/meson.build index f0fe5f8799..1644bbd83c 100644 --- a/meson.build +++ b/meson.build @@ -224,8 +224,7 @@ if 'CONFIG_BRLAPI' in config_host brlapi =3D declare_dependency(link_args: config_host['BRLAPI_LIBS'].spli= t()) endif =20 -sdl =3D dependency('sdl2', required: get_option('sdl'), static: enable_sta= tic, - include_type: 'system') +sdl =3D dependency('sdl2', required: get_option('sdl'), static: enable_sta= tic) sdl_image =3D not_found if sdl.found() # work around 2.0.8 bug --=20 2.27.0.windows.1 From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503849; cv=none; d=zohomail.com; s=zohoarc; b=hgw7N5YXQAqpdMhyew+KdnTgC9/ORB07Y/gSa/Dpk73aEgDHxsbtFKHA95MIeb2/zVV5s+PuWc+pq0jqgCY2IGWI1DCgqyfpwZlr8WwreZxiTI6ye0l3FNCy/gOTl9c0uV9z8VmaFn+f0c2Bh6xDKdRTZ1nz23wInphJ62EdX6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503849; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=bzrUXWXJ2P4FPb4Z7Y3jIG7wAqzpJKqykSmKTUKfTsk=; b=E7hKQnow6RBs2fTEAOfT1FNt2RMqYSRiCM+kIVHY5YJVY35JCK6rSqq+Kjhhdyr+qu77C0sFzuOj8Yv1tS8zb1mo4sB42yPOzi/zkuoZpPQIYJVo98ODfuLtXTPjxAlrBFi0sJbpAFwGqwfqugpE+NS6yM+rWvVQl4LdBLWmxyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598503849289764.7885717567812; Wed, 26 Aug 2020 21:50:49 -0700 (PDT) Received: from localhost ([::1]:54914 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9s8-00050N-1H for importer@patchew.org; Thu, 27 Aug 2020 00:50:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59596) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9rH-0003FT-W1 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:56 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:45501) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9rG-0003hS-A8 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:49:55 -0400 Received: by mail-pf1-x443.google.com with SMTP id k15so2518721pfc.12 for ; Wed, 26 Aug 2020 21:49:53 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bzrUXWXJ2P4FPb4Z7Y3jIG7wAqzpJKqykSmKTUKfTsk=; b=YVv1Ib07Z5BTFZThHFHO2eZY+ETSoZrunGRE5EJ8SgvSfL/u0L3ciZCksSgfzhbpIg YGRRrppnI4uH+6vIY6R6nSzfubPnv/73FAgnFTUfzV7YZBkyagHHh9+6I51pgAcUuA5X 3vGm75JBIfozTPJSBJYlQz9k7qHsnicGrsnfj93viXutHgdyuo9IzWpwggZ3dug5GaRd VqH1y9qMmKzzsjjd8ZuCV52JaHlw9H8zQm4E4rinypZzi6bzoa8ImszE0M4z1m9Ue6om I8rzyPY4gFc2FBdAZUj24iXrd1jrrOPt7LYcqjyc+M8apSECJt2exNGrNtzS3NSBlBKn nx0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bzrUXWXJ2P4FPb4Z7Y3jIG7wAqzpJKqykSmKTUKfTsk=; b=SewAPc+o7rcEP5IEL2UUDsxob7txb1UYveoIEg/tbXn0WW0xddRUvIwjk/ZIcoJyRB pT7v2cI+xfa5Wo6pgFkd7C3NfqQ69cDhOt2Ri3s3L3duwuGTmgCtp28SGXZcpbBtUvfW doWuq5tJAZbIit94GuedPsrcS6mTgB/TmfyL1i9Qya2kvsJAu/Nzoby6MjcyAaA4JEFA jvvMCtfSjqJ+/n7h0odip9xYbeLDXJ+Clelj2uQj+8TLnU5pJ0jytq+02WAyUoOzeHhX pB5J3lj93RpA0oUBkHJHbJC5bZiFOXf+uN3aEuWVeSDlIR2OQRoc0F9KjObDAXQF0bZW ds7A== X-Gm-Message-State: AOAM532OlCRFgM1Op+NpZ8VPl45AA4mdCHvsmnfl34YwknF36/9+c6FC AXYtegAQ5X2obeD/iUzRca7bHeqqvtRe599Ny48= X-Google-Smtp-Source: ABdhPJxETKaIFGGGLmLy5aBLaWScG0C/uhnbHYz370MQkTrKXkelKfoRM+Ah+4vnIa0cFyGqcUakZQ== X-Received: by 2002:a65:6554:: with SMTP id a20mr11985299pgw.301.1598503792549; Wed, 26 Aug 2020 21:49:52 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 4/6] configure: Fix include and linkage issue on msys2 Date: Thu, 27 Aug 2020 12:49:15 +0800 Message-Id: <20200827044917.1356-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::443; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by the= compiler Cause $PWD are result posix style path such as /e/path/to/qemu that can not= be recognized by mingw gcc, and `pwd -W` are result Windows style path such as E:/path/to= /qemu that can be recognized by the mingw gcc. So we replace all $PWD with $build_path tha= t can building qemu under msys2/mingw environment. Signed-off-by: Yonggang Luo --- configure | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/configure b/configure index b1e11397a8..3b9e79923d 100755 --- a/configure +++ b/configure @@ -13,8 +13,13 @@ export CCACHE_RECACHE=3Dyes =20 # make source path absolute source_path=3D$(cd "$(dirname -- "$0")"; pwd) +build_path=3D$PWD +if [ "$MSYSTEM" =3D "MINGW64" -o "$MSYSTEM" =3D "MINGW32" ]; then +source_path=3D$(cd "$(dirname -- "$0")"; pwd -W) +build_path=3D`pwd -W` +fi =20 -if test "$PWD" =3D "$source_path" +if test "$build_path" =3D "$source_path" then echo "Using './build' as the directory for build output" =20 @@ -346,7 +351,12 @@ ld_has() { $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 } =20 -if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; +check_valid_build_path=3D"[[:space:]:]" +if [ "$MSYSTEM" =3D "MINGW64" -o "$MSYSTEM" =3D "MINGW32" ]; then +check_valid_build_path=3D"[[:space:]]" +fi + +if printf %s\\n "$source_path" "$build_path" | grep -q "$check_valid_build= _path"; then error_exit "main directory cannot contain spaces nor colons" fi @@ -942,7 +952,7 @@ Linux) linux=3D"yes" linux_user=3D"yes" kvm=3D"yes" - QEMU_INCLUDES=3D"-isystem ${source_path}/linux-headers -I$PWD/linux-head= ers $QEMU_INCLUDES" + QEMU_INCLUDES=3D"-isystem ${source_path}/linux-headers -I${build_path}/l= inux-headers $QEMU_INCLUDES" libudev=3D"yes" ;; esac @@ -4283,7 +4293,7 @@ EOF symlink "$source_path/dtc/Makefile" "dtc/Makefile" fi fdt_cflags=3D"-I${source_path}/dtc/libfdt" - fdt_ldflags=3D"-L$PWD/dtc/libfdt" + fdt_ldflags=3D"-L${build_path}/dtc/libfdt" fdt_libs=3D"$fdt_libs" elif test "$fdt" =3D "yes" ; then # Not a git build & no libfdt found, prompt for system install @@ -5268,7 +5278,7 @@ case "$capstone" in else LIBCAPSTONE=3Dlibcapstone.a fi - capstone_libs=3D"-L$PWD/capstone -lcapstone" + capstone_libs=3D"-L${build_path}/capstone -lcapstone" capstone_cflags=3D"-I${source_path}/capstone/include" ;; =20 @@ -6268,8 +6278,8 @@ case "$slirp" in git_submodules=3D"${git_submodules} slirp" fi mkdir -p slirp - slirp_cflags=3D"-I${source_path}/slirp/src -I$PWD/slirp/src" - slirp_libs=3D"-L$PWD/slirp -lslirp" + slirp_cflags=3D"-I${source_path}/slirp/src -I${build_path}/slirp/src" + slirp_libs=3D"-L${build_path}/slirp -lslirp" if test "$mingw32" =3D "yes" ; then slirp_libs=3D"$slirp_libs -lws2_32 -liphlpapi" fi @@ -8212,7 +8222,7 @@ fi mv $cross config-meson.cross =20 rm -rf meson-private meson-info meson-logs -NINJA=3D$PWD/ninjatool $meson setup \ +NINJA=3D"${build_path}/ninjatool" $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \ @@ -8232,7 +8242,7 @@ NINJA=3D$PWD/ninjatool $meson setup \ -Dvnc=3D$vnc -Dvnc_sasl=3D$vnc_sasl -Dvnc_jpeg=3D$vnc_jpeg -Dvnc_png=3D$v= nc_png \ -Dgettext=3D$gettext -Dxkbcommon=3D$xkbcommon \ $cross_arg \ - "$PWD" "$source_path" + "$build_path" "$source_path" =20 if test "$?" -ne 0 ; then error_exit "meson setup failed" --=20 2.27.0.windows.1 From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503943; cv=none; d=zohomail.com; s=zohoarc; b=KMy2aWzmwkg7yVQP2WFetpqKeoOl4NJegWLdXhKcRkJKw1I4jAuo4sRK8vbaKEO1yb4qSrKsREv9C/wXgtLDk/O0YAyveV3jAbjexEOEEL9usOS8Wovn5UVV3VrbAcNUS14fvDwZkQNgel2moUIfReQEicKr3yAVWM8+bC5J/Es= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503943; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kZmgaDEBNjpxaFbsHI9krVOWSzauPOV79k08lIpZd10=; b=bxuaB2ejN5wczcmsMrI1CRFKzu/yvZXNNmbbPXqWSRv6mhzg+3zU2rzppUTk3uH8TiN154u53Sp2oC9tgPzpAN0VV+okJSdYKP8U1Xm2yF1B30XF/H7CHAfvzNPUlS60J9/fL2zbIis7dHbCtSr1yPA5/l8Afc7+wjlzz7PQ4Zk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15985039431971015.4968459200178; Wed, 26 Aug 2020 21:52:23 -0700 (PDT) Received: from localhost ([::1]:33494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9td-0007jS-W8 for importer@patchew.org; Thu, 27 Aug 2020 00:52:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59616) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9rM-0003SB-D2 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:50:00 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:41134) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9rK-0003if-TC for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:50:00 -0400 Received: by mail-pf1-x431.google.com with SMTP id t9so2524262pfq.8 for ; Wed, 26 Aug 2020 21:49:58 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kZmgaDEBNjpxaFbsHI9krVOWSzauPOV79k08lIpZd10=; b=mnYqXqsKTtbQIH6/GS/xi23dYMopeW/QeA0sIyy+n9jIMxPIcAgdtMDb1Ik4JSaeKv 0KsI1ywEcNzYst2JHICcrBt5tqLyAkzFKD21TDQYx5BPQcY+0HDcle9HszXAiEQtzpC8 gGPtUeVl9Es7bc44JlhHnCBq3B70TO5Wix8NcSGYrmKT8MpnfUzlkhj7FIrdmaNXIxOJ 1CmMW1fTIbm6pOZ+0OiLJW+eRTwgvhM2wCiFTw8MuqQexI8T6quSpeRlRMnRYbBZ4PDA KiUvFXDs04sj46TR9zP1LuD7cJ76zXrLW61GsVu2/TiGCquiydD1GYnEtgeUw78PgYE3 gw8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kZmgaDEBNjpxaFbsHI9krVOWSzauPOV79k08lIpZd10=; b=sudiQBUAeGcZsyJlnwUlzNKRBe6uW75DiI1Ie8EqA8T5PB1KCTUBYGm55l89JO1TYF zVw7IEhEp1LembyNqz36jORxjN3qT6KDq475hUPKj6KXayFjvAuEsGDWvqISAuEEHH7X 6c0iILKuOu1gNh6xohBfFPI9fdo6+1jY4doiO0GrfAoVCQwHPmTxktTNPndZsnWPiOuj dy8Xg6Z9LJQplsX/ri49tz5FpQQ6dBe12Sv1J0rwbIv+HhFo+XwDhMpB+bJD3yu5t44P OXbq03cDJxAFTLMvJTHcqVZleFHEIlKeCP7HDFHSs8eUEwKBxuArl3jQHaLyatZ2ArSH Wyew== X-Gm-Message-State: AOAM530mg602/qQgLnUQ3sMFN8zvCIj1gdSf1rtzkNNlZYplZwxP3KSX iBGc819oz1mzxFYa71WipkSJUgl30AL0SLtBFxU= X-Google-Smtp-Source: ABdhPJyB7jUpg2txTcOAjfkTu1Uhd106g3LZjOCTGz3xYHrZZhAVdzUlj1GjfLUNLrEEEdQNzpowrQ== X-Received: by 2002:a17:902:9690:: with SMTP id n16mr11900274plp.305.1598503797093; Wed, 26 Aug 2020 21:49:57 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 5/6] meson: Fixes ninjatool can not be recognized as script under Window/MSYS2 Date: Thu, 27 Aug 2020 12:49:16 +0800 Message-Id: <20200827044917.1356-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::431; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x431.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo use ninja instead ${build_path}/ninjatool Signed-off-by: Yonggang Luo --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 3b9e79923d..2ad0c58492 100755 --- a/configure +++ b/configure @@ -8222,7 +8222,7 @@ fi mv $cross config-meson.cross =20 rm -rf meson-private meson-info meson-logs -NINJA=3D"${build_path}/ninjatool" $meson setup \ +NINJA=3D"ninja" $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \ --=20 2.27.0.windows.1 From nobody Sun May 19 04:34:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1598503905; cv=none; d=zohomail.com; s=zohoarc; b=abAEdvnmGFO+pL2KfR/aStYxOY8FRJxIlQTdw8cIKEkM4e9PAnCsE92SqNvFv3PDNZpszouglScY2DBuCaxmWKOB7jUalaPHpok7xc7b8p1DfNuY9rr6f413IPKXkC51Y3uKJkZgUaMAm7/vfzeSNup2s9teDhc2Yw/ZJiWz+Bo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598503905; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hAIHaNoFAufwAGE6KbRmUZ0ExbibwWjhonjd/BMqxdQ=; b=BuJJXG8JynARYMAMl5qo/SGUokYFz7kRBXLcR1aQE+BnvWGaYlRoerw3gusnIv+iBXIBN/5hk9htZAgRi++pOUmn/kJ1eqel+DJwRlgyOh93pH5ySjPYsFVhwZNAO30qoO4nTvBKeT5udVIQkqf07mEFEcA4ejQX5Lx3eyGReXM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159850390512458.85290071223494; Wed, 26 Aug 2020 21:51:45 -0700 (PDT) Received: from localhost ([::1]:60012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kB9t1-00072e-T7 for importer@patchew.org; Thu, 27 Aug 2020 00:51:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59628) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kB9rQ-0003dh-NY for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:50:04 -0400 Received: from mail-pg1-x52c.google.com ([2607:f8b0:4864:20::52c]:33454) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kB9rO-0003is-QR for qemu-devel@nongnu.org; Thu, 27 Aug 2020 00:50:04 -0400 Received: by mail-pg1-x52c.google.com with SMTP id o13so2478185pgf.0 for ; Wed, 26 Aug 2020 21:50:02 -0700 (PDT) Received: from localhost.localdomain ([2401:c080:1c01:4fe:5400:2ff:fef1:b056]) by smtp.googlemail.com with ESMTPSA id n26sm902296pff.30.2020.08.26.21.49.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 21:49:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hAIHaNoFAufwAGE6KbRmUZ0ExbibwWjhonjd/BMqxdQ=; b=H6OSlufeVe70sUyXpUiMZIh+/E9q3jJGFxgmBsSFtgWd/z9QNkwjELY8U6DjAqEUoz NrSCrB+dqnZVvnyR/OTJe4BnnxYPPSqfOsu+DMrk26O3vLAD4w3Xxk3zariVBEZrkMwO UHpnVqTEjunnYwdAdcbVArmW7NIMEPIG3eY2SPAS5aTbzBp3B549yK6TojvS0dn8jEpj tWXnrttZZgmWaMljl8qK7m6VRIMzxuiJg48AumIMwxzPQdMN0LKufhj6BHGfu+xuC9ba bMc09ZqcmxfNmv3fW1qTrFppdvsnE3mUZ5kkw4MYRvA4k8uK+gdyOxK6kDbhGN3e38av BXow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hAIHaNoFAufwAGE6KbRmUZ0ExbibwWjhonjd/BMqxdQ=; b=hQE/hqTjoOoVWQMz/AbuyROizeSt2uWroe1NyHUoTnwbrg3vZMZ/mygZu3zzKQ1Bwc U4K9lEtCuAMwqmc94rt1kjOMvLEPZJ8xtc4veFTKLv34dB5f08mvW2WkwpQNaAF1AcL4 2S25ZGtCJtop08wpgXhIAIQQvSQxkbmLPoEEF7+lj8VYkwxbd391DbWcY1xYpmZJpVEY Ohtrtn+pQYuC5jleK+3TIsYxHIrUI8+hKsgIRQkbtD53jfBkHHcHH20BPsDJ+Bz+VvY6 dV2mNvPikSkZLRzUL35EZIuxCvsk21H1HXZXzaJiH4dyHmJlEOa5OgDdoSsanFCyoIm3 zwtQ== X-Gm-Message-State: AOAM530FppUAl7zWE4KwRV9+rh321VLXDyCI8RfuvKBG+GgP+jhVBFH6 p9yQ8bhq7AOTst9P/qNDXHUpZHaRK8u9CrfNL3Q= X-Google-Smtp-Source: ABdhPJztqGONx5q3IWhvve9gq6nFnqL/m+pwhe9FZcGDz9YhMBw5T55zSdREXE71U722+RnDijo/Cg== X-Received: by 2002:aa7:854f:: with SMTP id y15mr14843926pfn.298.1598503800706; Wed, 26 Aug 2020 21:50:00 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH 6/6] meson: Convert undefsym.sh to undefsym.py Date: Thu, 27 Aug 2020 12:49:17 +0800 Message-Id: <20200827044917.1356-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827044917.1356-1-luoyonggang@gmail.com> References: <20200827044917.1356-1-luoyonggang@gmail.com> 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=2607:f8b0:4864:20::52c; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, 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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Yonggang Luo undefsym.sh are not msys2 compatible, convert it to python script Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/undefsym.py | 57 +++++++++++++++++++++++++++++++++++++++++++++ scripts/undefsym.sh | 20 ---------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 scripts/undefsym.py delete mode 100755 scripts/undefsym.sh diff --git a/meson.build b/meson.build index 1644bbd83c..d6e3bcea7e 100644 --- a/meson.build +++ b/meson.build @@ -845,7 +845,7 @@ foreach d, list : modules endforeach =20 nm =3D find_program('nm') -undefsym =3D find_program('scripts/undefsym.sh') +undefsym =3D find_program('scripts/undefsym.py') block_syms =3D custom_target('block.syms', output: 'block.syms', input: [libqemuutil, block_mods], capture: true, diff --git a/scripts/undefsym.py b/scripts/undefsym.py new file mode 100644 index 0000000000..c690f88c7a --- /dev/null +++ b/scripts/undefsym.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Before a shared module's DSO is produced, a static library is built for = it +# and passed to this script. The script generates -Wl,-u options to force +# the inclusion of symbol from libqemuutil.a if the shared modules need th= em, +# This is necessary because the modules may use functions not needed by the +# executable itself, which would cause the function to not be linked in. +# Then the DSO loading would fail because of the missing symbol. + + +""" +Compare the static library with the shared module for compute the symbol d= uplication +""" + +import sys +import subprocess + +def filter_lines_set(stdout, is_static =3D True): + linesSet =3D set() + for line in stdout.splitlines(): + tokens =3D line.split(b' ') + if len(tokens) >=3D 1: + if len(tokens) > 1: + if is_static and tokens[1] =3D=3D b'U': + continue + if not is_static and tokens[1] !=3D b'U': + continue + new_line =3D b'-Wl,-u,' + tokens[0] + if not new_line in linesSet: + linesSet.add(new_line) + return linesSet + +def main(args): + if len(args) <=3D 3: + sys.exit(0) + + nm =3D args[1] + staticlib =3D args[2] + pc =3D subprocess.run([nm, "-P", "-g", staticlib], stdout=3Dsubprocess= .PIPE) + if pc.returncode !=3D 0: + sys.exit(-1) + lines_set_left =3D filter_lines_set(pc.stdout) + + shared_modules =3D args[3:] + pc =3D subprocess.run([nm, "-P", "-g"] + shared_modules, stdout=3Dsubp= rocess.PIPE) + if pc.returncode !=3D 0: + sys.exit(-1) + lines_set_right =3D filter_lines_set(pc.stdout, False) + lines =3D [] + for line in sorted(list(lines_set_right)): + if line in lines_set_left: + lines.append(line) + sys.stdout.write(b'\n'.join(lines).decode()) + +if __name__ =3D=3D "__main__": + main(sys.argv) diff --git a/scripts/undefsym.sh b/scripts/undefsym.sh deleted file mode 100755 index b9ec332e95..0000000000 --- a/scripts/undefsym.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env bash - -# Before a shared module's DSO is produced, a static library is built for = it -# and passed to this script. The script generates -Wl,-u options to force -# the inclusion of symbol from libqemuutil.a if the shared modules need th= em, -# This is necessary because the modules may use functions not needed by the -# executable itself, which would cause the function to not be linked in. -# Then the DSO loading would fail because of the missing symbol. - -if test $# -le 2; then - exit 0 -fi - -NM=3D$1 -staticlib=3D$2 -shift 2 -# Find symbols defined in static libraries and undefined in shared modules -comm -12 \ - <( $NM -P -g $staticlib | awk '$2!=3D"U"{print "-Wl,-u," $1}' | sort -u)= \ - <( $NM -P -g "$@" | awk '$2=3D=3D"U"{print "-Wl,-u," $1}' | sort -u) --=20 2.27.0.windows.1