From patchwork Thu Aug 27 05:05:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739941 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F75117C7 for ; Thu, 27 Aug 2020 05:06:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 254C82080C for ; Thu, 27 Aug 2020 05:06:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YsLcjvRX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 254C82080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA7g-0004VO-8y for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:06:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA6x-0002vv-Eo for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:07 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:43394) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA6t-0005e7-O0 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:07 -0400 Received: by mail-pg1-x542.google.com with SMTP id d19so2483370pgl.10 for ; Wed, 26 Aug 2020 22:06:03 -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=YsLcjvRX+WcK6eYyQRSaanX+IZhHcI5T0+N+EkuDFA/XgBL1wUT0v2qtab52rcEz32 BluOivHgKqkFGzVstEKM1sFXCyeHoKR+XqA0CVU87AUitr+ZbIuyGXx4EREpI34uv35E mj3TxbEprXtZlZb5qehgDVzyR9AGp2FxH/Zd6YzztNcr8iNKUq3jEdeyW4uRDsefwfVu emHPoyyzdMDQKh3+V7PtWYJ/dgh2NROrvdjzhL1K1gSX+9/dNbBai7EZo+vibRdDWnTa BGptbtcKpxkD+qVBfcGCJ0RR9LWkUZHZZghnGlXokjRszq+4Ef+MKnD1lOR/uzaTJr15 zAqA== 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=Uk83Z7rGD2clMaXGir3XQWichT9WZMS39bojcIcUbku9fQhjzWp5JgFnUsz0PGjMyv jkQsO3QV705tSKwEJ1LxbfyQGFTLYj18AVJY3y9z6ycRnAO9hJC3hxZSQP72/c7eO1nY x6aYevCPxDsxVqKNvMNMm3pwl2wZkeSLOWGUR/i4/SMFGG4fXNI7T/wRwsv9vhd459gX z4o/jsmj54hLL5A3iZoXR/XGKJkMXWZtAy0lnuCy2D+TEgRIfLtG2uKA0g5iTrp3oy4K Ffk4tBBgMXaheapcNKIzSnEgZln7U+9b5jPtIBExSuFP7dyAmWv4gxuDAGTPa+nvTDac yi6w== X-Gm-Message-State: AOAM532R4NBS1bwnB0WiI092PhG8eq/v4W77XMBMfu03wx5eXQqlmiKJ jqCHWXTWPqTAFx6ZUKe/vDp26K1Ez6JAXm9CMUE= X-Google-Smtp-Source: ABdhPJyyOwff+ERLih2sCkkfjAaEHr8X/PeBp3LipdcXvTxUVItcCl4i8F9hQbAlzVb8OwASse6MPg== X-Received: by 2002:a63:ca4e:: with SMTP id o14mr13594865pgi.213.1598504761754; Wed, 26 Aug 2020 22:06:01 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.05.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:00 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 1/6] meson: Fixes the ninjatool issue that E$$: are generated in Makefile.ninja Date: Thu, 27 Aug 2020 13:05:38 +0800 Message-Id: <20200827050543.44-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x542.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 with 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: PATH_RE = r"[^$\s:|]+|\$[$ :]|\$[a-zA-Z0-9_-]+|\$\{[a-zA-Z0-9_.-]+\}" -SIMPLE_PATH_RE = re.compile(r"[^$\s:|]+") +SIMPLE_PATH_RE = re.compile(r"^[^$\s:|]+$") IDENT_RE = re.compile(r"[a-zA-Z0-9_.-]+$") STRING_RE = re.compile(r"(" + PATH_RE + r"|[\s:|])(?:\r?\n)?|.") TOPLEVEL_RE = re.compile(r"([=:#]|\|\|?|^ +|(?:" + PATH_RE + r")+)\s*|.") From patchwork Thu Aug 27 05:05:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739943 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8AFF01731 for ; Thu, 27 Aug 2020 05:06:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 619AE2080C for ; Thu, 27 Aug 2020 05:06:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QwGxgV3D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 619AE2080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:43450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA7g-0004Tq-Gc for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:06:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA6x-0002wU-Rn for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:07 -0400 Received: from mail-pg1-x536.google.com ([2607:f8b0:4864:20::536]:34033) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA6w-0005eR-CF for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:07 -0400 Received: by mail-pg1-x536.google.com with SMTP id i10so2505361pgk.1 for ; Wed, 26 Aug 2020 22:06:06 -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=QwGxgV3DwW4Gqh6cTpNyIQNVr1PFP/aqnbfRYl7USE5FcwLjenD5+M8iFkq6Si7dEP i8Bi0ARPPVvlkkilAkP2Ydor18D2kgXdsGmhOhSgYfNEVv2MKbuq9thsMRPJTeMZbS6j FrK3zB+cpDtvdLKft/VuI/sUWzVvrzT8pGuUlQ8fBsYNF2Vi9t2nSF9SIRUs/39k1vX5 rdLoHGRz0juAjdY1qmmKymuwQ831oNBWe/Zo6A6HGHGhzTdgQE7HAa+i4ETCEmeWB6jE 9L8xeDK0XJrTMQnJZioR9aJXUty6kZh47k45sYvlklJtwsZTo+vyWzSU3BvMwJf12KdB qjfw== 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=qAmpd3UQfmrgF6lwUfb8krGbcBNLLLKeL96xcawPml2wdPM6hfPd0T4Ilz2YdO10HT tBFxY0tebiXFYqorZUrWA7HTODiKUC7V8kNomhe1J428IOqwymCLsRLksQ+iElOl61HN ZAd8hfQoinJT1ciQxIp6yUY5rQhwoKaBaH9Jnk5IePUlzZAvTvsWYPO/2N5nJP3/E9iS 68FCeLT+krCeHHSaKRPilc1qdk16c/5/g64OWuPnUSd+jxT4DZJ/5h85modYiw+uey74 e47AONyVxXYDNnWyX0i8d0w1oZbzWl9DphhxWk+2H1N7Ae0pCFsujJ1+PxsMOKT3VY4F EkhA== X-Gm-Message-State: AOAM532EJYmgqqATXbhHiGZYjnoT2lEfWz3Q7vveJOPBbLhsR6+z7g0Z kObRnp6k84GD8jcI9gsPUvYRoZYc+yp+gDFGCoc= X-Google-Smtp-Source: ABdhPJwUwogKFyngGRwqRTTqva0L4MpZuRuZ4gZmaJf4YOfBPlEEQgQzDdK4eYS+VXB0aBfEJl/Lbg== X-Received: by 2002:a63:920e:: with SMTP id o14mr13184291pgd.367.1598504764477; Wed, 26 Aug 2020 22:06:04 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:03 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 2/6] meson: fixes relpath may fail on win32. Date: Thu, 27 Aug 2020 13:05:39 +0800 Message-Id: <20200827050543.44-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::536; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x536.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: Yonggang Luo On win32, os.path.relpath would raise exception when do the following relpath: 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 = 0 for test in json.load(sys.stdin): env = ' '.join(('%s=%s' % (shlex.quote(k), shlex.quote(v)) for k, v in test['env'].items())) - executable = os.path.relpath(test['cmd'][0]) + executable = test['cmd'][0] + try: + executable = os.path.relpath(executable) + except: + pass if test['workdir'] is not None: - test['cmd'][0] = os.path.relpath(test['cmd'][0], test['workdir']) + try: + test['cmd'][0] = os.path.relpath(executable, test['workdir']) + except: + test['cmd'][0] = executable else: test['cmd'][0] = executable cmd = '$(.test.env) %s %s' % (env, ' '.join((shlex.quote(x) for x in test['cmd']))) From patchwork Thu Aug 27 05:05:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41763138A for ; Thu, 27 Aug 2020 05:08:09 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 185B22080C for ; Thu, 27 Aug 2020 05:08:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TkDDcUg2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 185B22080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:50968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA8u-0007VY-9O for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:08:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA70-00031Y-Dv for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:10 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:36068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA6y-0005ej-R1 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:10 -0400 Received: by mail-pf1-x429.google.com with SMTP id m8so2565896pfh.3 for ; Wed, 26 Aug 2020 22:06:08 -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=TkDDcUg2GU/8UeZcEWahaO+7zHC5uhjvAo5b8Ty6Pt1uxCM1L2/w9XS2Zlx10L4Z+S AkZjj63BqK8svVdTuxqVNRYOE/QtYQC9Mmd82Qax+JsdQj/k/HII4KPQVQaatzx2DLkb fn4wgwVB9sYlaz4uGwOhqgbjarsZO4hknC2lN3i/1lCU+Bju56AO/n5fsPGDhafQRl+H jDV4mFoCnXCFfm3bH6MYoHjQj3ZzZ7igWawc0gi/on89/XSSfXFcZHKTyQ1rkXKL43tK bkyuMyF4Rg6UvRqdRKvm9KU6/GrZ9ddV6AjFnOiHCgqcuc1yd1uIj9xrKivET384JweC niGA== 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=Q5narCu+jqJphJpNy7Vnp8zp0X0zZU/bK2a2gCAaWKmZQckiHDtkZ2PcwliZDND5Ot /LctKXuUm0LgNVgjaDL8FxOH0qE2iGWEkb77VHXWDEj6XIrcVnqRkmuz7WUlFdc9X99T jLZOxVXS7pqircNV689xuXYsMvo1AJbVa/KX/YDQV3qJiNjBfnTnatuoFBg7YT3waUm6 Kr1S74EqKbSfXo8vGar7XsLBmKaVBQuFRQ22TLAd+zPUITWhGi/Mzn5m/zUWvegeScpZ 2QDjVzGhAJiVMk0WpR5d7G8NevtzRxvjKbbvis72pQvdwNm/x8GmBfmCj5qYoNqcDj+K RG/w== X-Gm-Message-State: AOAM533V9bs5M0r0tzZ/1xtH8Ru5xEkQ2AwaUoD6T2k8Qaobeq85vEZy tQH8L6YDVBrAOcxLkzMvj/lLaf2VQrps8Vgqe3k= X-Google-Smtp-Source: ABdhPJxzzIC0pwcJzoBcpsJCC5d/Kfk0Y63gjUnGLvYfxsgmvSniX91t8/Cej2ZwZzINyHkMakXl+Q== X-Received: by 2002:a63:471b:: with SMTP id u27mr13149500pga.139.1598504766932; Wed, 26 Aug 2020 22:06:06 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.06.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:06 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 3/6] meson: Mingw64 gcc doesn't recognize system include_type for sdl2 Date: Thu, 27 Aug 2020 13:05:40 +0800 Message-Id: <20200827050543.44-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::429; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x429.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 = declare_dependency(link_args: config_host['BRLAPI_LIBS'].split()) endif -sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static, - include_type: 'system') +sdl = dependency('sdl2', required: get_option('sdl'), static: enable_static) sdl_image = not_found if sdl.found() # work around 2.0.8 bug From patchwork Thu Aug 27 05:05:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739951 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B26B138A for ; Thu, 27 Aug 2020 05:09:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D346E2080C for ; Thu, 27 Aug 2020 05:09:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AMd/hRnB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D346E2080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:54778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA9r-0000dP-5A for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:09:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA74-0003A1-4A for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:14 -0400 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:51984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA72-0005ew-0I for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:13 -0400 Received: by mail-pj1-x1043.google.com with SMTP id ds1so2002448pjb.1 for ; Wed, 26 Aug 2020 22:06:11 -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=AMd/hRnBoOadugRFtgVRMLrx0hyZKTwfLbPCxXHDOWfKE8m1vuUUD6yG1xe6yOFS7f BS14D9XlW2eMKNFmie7kpv+whUkSECg2hp9415H4/6gfiR7UlRxjzCgJTrISsRl1ZTxi uStB1dt/HRUZXRHFDaxk7YzAgIQPmLsNn5MNWjRaCuxvDsS5y70DCsXdA+QS2ZQnePb+ buthdH+p6dIxhotfaH6mT1uhTc0I295YDELF0otQIYAe2LNKmf8G5P39D29BhkHDnpVX CWZPdAdj8RMj/4G77UG5WnflwGkByc7/1WHr1kX0E13NYAcukbOoozP6y71AmNszrRMq URGw== 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=ofMGQV9f5Ijrbl/RA7+jZgV2kG0lwAyteDY0lct+il8WGwLwXYBrR7RBxC8D/WzL1w 9EI7/ZuUpvxbyhGIu3+CmHEryHSghHSTPUI+bxNRNEDT3cjhC3xFciB0HP7XtPlrxS8y G71v76nJMBIkxUIKFvCDuYTeFhehKYEkaPXzyL/DomGdfwf7auLqxkLx3ZyG/ArHtgpA zg32DERH5AzUF4ok0790I8XtHNw6oK55F/g24xcoIYYPqaeYjAFAQ7GB7CHR30CGLvmI XIjFDybJJ9MbKCtqDdeEJgCT7UZaLqPk1CoH+zw9+yNdzETTe2C4lrQZKqD0+cffPvuM 0C+g== X-Gm-Message-State: AOAM531HzRpTm+9pjUarcciF1ZkvPPtOpzaKhkx/aEfFubhAFWERYhRB /KMUAO72psVTZ7RQpSGsQ/npN7x4sQu29broWWg= X-Google-Smtp-Source: ABdhPJyDwzFx2odXZNgsEF9/GtG8aRfRE5Q+J+xPklSrtv/SADuoAeJ9gMQE9UpJj5jzuKV4xg68lA== X-Received: by 2002:a17:90b:3108:: with SMTP id gc8mr9574340pjb.159.1598504770135; Wed, 26 Aug 2020 22:06:10 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.06.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:09 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 4/6] configure: Fix include and linkage issue on msys2 Date: Thu, 27 Aug 2020 13:05:41 +0800 Message-Id: <20200827050543.44-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1043; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1043.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 that 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=yes # make source path absolute source_path=$(cd "$(dirname -- "$0")"; pwd) +build_path=$PWD +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then +source_path=$(cd "$(dirname -- "$0")"; pwd -W) +build_path=`pwd -W` +fi -if test "$PWD" = "$source_path" +if test "$build_path" = "$source_path" then echo "Using './build' as the directory for build output" @@ -346,7 +351,12 @@ ld_has() { $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 } -if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; +check_valid_build_path="[[:space:]:]" +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then +check_valid_build_path="[[: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="yes" linux_user="yes" kvm="yes" - QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES" + QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I${build_path}/linux-headers $QEMU_INCLUDES" libudev="yes" ;; esac @@ -4283,7 +4293,7 @@ EOF symlink "$source_path/dtc/Makefile" "dtc/Makefile" fi fdt_cflags="-I${source_path}/dtc/libfdt" - fdt_ldflags="-L$PWD/dtc/libfdt" + fdt_ldflags="-L${build_path}/dtc/libfdt" fdt_libs="$fdt_libs" elif test "$fdt" = "yes" ; then # Not a git build & no libfdt found, prompt for system install @@ -5268,7 +5278,7 @@ case "$capstone" in else LIBCAPSTONE=libcapstone.a fi - capstone_libs="-L$PWD/capstone -lcapstone" + capstone_libs="-L${build_path}/capstone -lcapstone" capstone_cflags="-I${source_path}/capstone/include" ;; @@ -6268,8 +6278,8 @@ case "$slirp" in git_submodules="${git_submodules} slirp" fi mkdir -p slirp - slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src" - slirp_libs="-L$PWD/slirp -lslirp" + slirp_cflags="-I${source_path}/slirp/src -I${build_path}/slirp/src" + slirp_libs="-L${build_path}/slirp -lslirp" if test "$mingw32" = "yes" ; then slirp_libs="$slirp_libs -lws2_32 -liphlpapi" fi @@ -8212,7 +8222,7 @@ fi mv $cross config-meson.cross rm -rf meson-private meson-info meson-logs -NINJA=$PWD/ninjatool $meson setup \ +NINJA="${build_path}/ninjatool" $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \ @@ -8232,7 +8242,7 @@ NINJA=$PWD/ninjatool $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon \ $cross_arg \ - "$PWD" "$source_path" + "$build_path" "$source_path" if test "$?" -ne 0 ; then error_exit "meson setup failed" From patchwork Thu Aug 27 05:05:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739945 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2D2A1109B for ; Thu, 27 Aug 2020 05:07:02 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 00F902080C for ; Thu, 27 Aug 2020 05:07:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B3wBalM/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00F902080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:44462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA7p-0004sp-54 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:07:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA76-0003FT-CF for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:16 -0400 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]:55620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA74-0005f6-Ou for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:16 -0400 Received: by mail-pj1-x1033.google.com with SMTP id 2so1994258pjx.5 for ; Wed, 26 Aug 2020 22:06:14 -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=B3wBalM/yDYmUtfyBo1U/JZUa5rZT3EMGdbAd10MfTBZ+zwrKkWkllIQkl9/CO32RH TyOvL32luqe8bwdMqF0Ys8o9o6U3vyefVGx+r3dsR2yDs86fQ2efvqkKj4eTjtX+8nb6 0/zJqemfVaIvAJfGeZsMRCDgdoaX4yIIBsBqMNMFr8O28ASxV6d7TFhbyxM7LqR4dqh4 xO5AYA0/WLMpDbbn4Poy9YbdCvrRmUzMAkH53ypPrRWxV0HJEwxlKLqKrbqQg8Wqua5n hbJJKS7uVyThZ0xfBCUIgZYJsRJFcJxkCgmjj9NN9KEcZImueba+Q1utpgMk+lUUC4Qv HZPw== 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=c4mOc6devKTY7yzlAo5pXig8M3QWKbdTf13hMP28TIhfT4iAvksjskrYhVQXRrLZED lFmOs26uVw88Mu5mDaJm6rT8igsDABNC+6eKFfoayr62G7Zi+KDX3fE9Ik78l6evXG2y wYqyYr/Fupi1/7nDfqn7iPT+mTd1ze8OFNNt2pyJsKkuYzwJ8uA3+RAlixO7UmvdgJkh 4CnRkv8souL6VcuDJGJSexb03CqGH6wmBh9pZ2JI/TE2A772B3rpCyIVCRUAzxvYU/lY n0DFsSZuNU/hQfBXHq6A2gCDs9BECN9qNP5SjyK0Uv8Loo3I9OoB55qTLB8oL+mTriqy qnaw== X-Gm-Message-State: AOAM532b9uS+iVoLhoHOq7gdVMmWpfdUQCvJP5YuoQTbCarFbURpTl33 KUzwSv8Vahyotm0pGVFurPXRJWeBG76wIeMFdjo= X-Google-Smtp-Source: ABdhPJzox6zVI7SZ2VdIibKNtUHjdRTTqySlXPSzOJnAvPE5ZVJyCGjkLQJJ9jVaO65ED9YzGc6N2w== X-Received: by 2002:a17:90a:c505:: with SMTP id k5mr8718507pjt.188.1598504772817; Wed, 26 Aug 2020 22:06:12 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.06.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:12 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 5/6] meson: Fixes ninjatool can not be recognized as script under Window/MSYS2 Date: Thu, 27 Aug 2020 13:05:42 +0800 Message-Id: <20200827050543.44-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1033; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1033.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 rm -rf meson-private meson-info meson-logs -NINJA="${build_path}/ninjatool" $meson setup \ +NINJA="ninja" $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \ From patchwork Thu Aug 27 05:05:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 11739949 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D9654109B for ; Thu, 27 Aug 2020 05:08:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B01E92080C for ; Thu, 27 Aug 2020 05:08:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="coicLt5t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B01E92080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:51524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBA8z-0007jE-Uw for patchwork-qemu-devel@patchwork.kernel.org; Thu, 27 Aug 2020 01:08:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBA7A-0003PO-3i for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:20 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:42848) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kBA78-0005fX-87 for qemu-devel@nongnu.org; Thu, 27 Aug 2020 01:06:19 -0400 Received: by mail-pg1-x52a.google.com with SMTP id g1so2480578pgm.9 for ; Wed, 26 Aug 2020 22:06:17 -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=coicLt5tS3ZGmOlZMjwXMwss6hh4duXrLnJ2tTo2GoJi7Vq3D5gTDVgSy0NDlR4dM7 /PzNHbKNbv09uV+zOpvWebJUwy6TfJo4V4x34e3l5o5nEw4vez9KJkZl7wg+Qf8N5trt YBnXcKujei6/MYEMtuTnXn74bNYmTDD8wWaiw4mTg7LP3AraBs8/AJ/06d7rrBeEcadi KdDY23vgHPIgasoKrYUyM2yzBbVnJjtKc4v57cD0WBn2gPBzwNf/KuNeZztHivpNklts RNlZ79Bqp8KvD+AcgXszbgldSV03RJ5bnltAWy0qnpr5lHWG0a80JRuOhkMqLtQIaezR E3gA== 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=pJHXAeBVTCHvwffbjtOaH7d8+pXv50x3rGM1uIwh40RC6wdmlzTHK/RE5pwLzDQyOi 0jOnJANmWTxLYrX40wHzx3BVeAacLPVT7Z9PUBblurmTFc263RDoPpWvYV1IIzw3fj8r UvuvmkKGabNqrcuSzi2b7qDSU7wWMXg0JmgjeoIJwDyx5TH7U/5P5+Nirw6iZ6NoHULj kcJ1CNpMMf/LVidOZb63sakxHNdpamNHUZZsPXJicMWtEQSzumitm7CaW+t1JsUgjeA5 d9OQNL2wLc2BvFT96d387sVWqceXSCTOmNi71o8Oc8r+PxzJ1gnJBxUtrPHW8DyezPbr Cuvw== X-Gm-Message-State: AOAM531xR1CsZICc+MMHo1vTxoQvFwPCWOITa+xf4Q7MPrAg4f1S+CZJ Oh2vtZULtBbIKCs2nTG+2ZtPM6jCj4Bc2n0HvDk= X-Google-Smtp-Source: ABdhPJymrNUFplPqIAk/ba4Itkf5ht7rujm9SaBdz9A45vrGbChKma+coDAQjzQjx/R/LLVdRol6tA== X-Received: by 2002:a17:902:be0f:: with SMTP id r15mr14964614pls.84.1598504775292; Wed, 26 Aug 2020 22:06:15 -0700 (PDT) Received: from localhost.localdomain ([103.94.185.75]) by smtp.googlemail.com with ESMTPSA id u3sm724213pjn.29.2020.08.26.22.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 22:06:14 -0700 (PDT) From: luoyonggang@gmail.com To: qemu-devel@nongnu.org Subject: [PATCH v2 6/6] meson: Convert undefsym.sh to undefsym.py Date: Thu, 27 Aug 2020 13:05:43 +0800 Message-Id: <20200827050543.44-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20200827050543.44-1-luoyonggang@gmail.com> References: <20200827050543.44-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52a.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?b?RGFuaWVsIFAgLiBCZXJyYW5n6IyF?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" 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 nm = find_program('nm') -undefsym = find_program('scripts/undefsym.sh') +undefsym = find_program('scripts/undefsym.py') block_syms = 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 them, +# 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 duplication +""" + +import sys +import subprocess + +def filter_lines_set(stdout, is_static = True): + linesSet = set() + for line in stdout.splitlines(): + tokens = line.split(b' ') + if len(tokens) >= 1: + if len(tokens) > 1: + if is_static and tokens[1] == b'U': + continue + if not is_static and tokens[1] != b'U': + continue + new_line = b'-Wl,-u,' + tokens[0] + if not new_line in linesSet: + linesSet.add(new_line) + return linesSet + +def main(args): + if len(args) <= 3: + sys.exit(0) + + nm = args[1] + staticlib = args[2] + pc = subprocess.run([nm, "-P", "-g", staticlib], stdout=subprocess.PIPE) + if pc.returncode != 0: + sys.exit(-1) + lines_set_left = filter_lines_set(pc.stdout) + + shared_modules = args[3:] + pc = subprocess.run([nm, "-P", "-g"] + shared_modules, stdout=subprocess.PIPE) + if pc.returncode != 0: + sys.exit(-1) + lines_set_right = filter_lines_set(pc.stdout, False) + lines = [] + 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__ == "__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 them, -# 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=$1 -staticlib=$2 -shift 2 -# Find symbols defined in static libraries and undefined in shared modules -comm -12 \ - <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \ - <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u)