From nobody Fri May 3 08:14:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44070+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44070+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1563681303; cv=none; d=zoho.com; s=zohoarc; b=PighauZU5bMKd9HVRVaY/DhIBSo7Fc1gtQLvV+hA1Lxa0wb1aC1Ms8pyuS++6udeAWQk5FEm56UBS+gR4ulaLS80CYN5wWXRDbiCgcWYJChlZei0IOtVpIQZWMtU9aUVXc1gZwr2MLhqiK2qAjwgFxLi5rEb3bgxfEDNLBK8xmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1563681303; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=36Hnt3viE0T1nj+qFS3rlyIG+N42k/GCGzloSHqttwg=; b=J7QXuzNF/pwfFli/CoKQ9zf+vf9deScwaDfZ9OP9HbMwHGkeWnMo/Np8ZfJV9R5jnkUfLsw9oupO9T7jhi5doQg/CZfDCiMwZlrzJJxvxirKw1MyGebKxM6jtcASvaewmg0rSlHDV7GjgbYOpElMxeP3cctK9B79qI57GLx32KA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44070+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1563681303145446.31346651786816; Sat, 20 Jul 2019 20:55:03 -0700 (PDT) Return-Path: X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by groups.io with SMTP; Sat, 20 Jul 2019 20:55:01 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Jul 2019 20:55:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,289,1559545200"; d="scan'208";a="320353478" X-Received: from shwdepsi1121.ccr.corp.intel.com ([10.239.158.47]) by orsmga004.jf.intel.com with ESMTP; 20 Jul 2019 20:54:59 -0700 From: "Bob Feng" To: devel@edk2.groups.io Cc: Liming Gao , Bob Feng Subject: [edk2-devel] [Patch] BaseTools: Fixed the mis-using strip() function issue. Date: Sun, 21 Jul 2019 11:54:52 +0800 Message-Id: <20190721035452.16704-1-bob.c.feng@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,bob.c.feng@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1563681302; bh=CfYWNEueW8iOOLVU5q+oy9cLtG1IIUhVS6w1TV3nvPE=; h=Cc:Date:From:Reply-To:Subject:To; b=RgxJDw8jrTu9CqoTQKcS5nndw0cEwLYXq79/oddwsOF2DN4PyVI3OIjeU6L6np0zolS LsuyUny2Y0jIux0WdYHLZ8UWXhcAI0u8et5r/7chbt6nZIhMV993KLbEgDvTyOnU3TG3i Mo1/Jr90KvuceHhApd1e2vHFS2DrFUPyI9k= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2003 lstrip(parameter) do the match based on the char in parameter but not only the whole parameter string. In GenMake line 1082, CmdSign.lstrip('/Fo') will strip the '/' or 'F' or 'o' on the left of CmdSign. This is not expected. This patch is going to fix such issue. Cc: Liming Gao Signed-off-by: Bob Feng Reviewed-by: Liming Gao --- BaseTools/Source/Python/AutoGen/GenMake.py | 2 +- BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 212ca0fa7f..10e67f7dbb 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -1077,11 +1077,11 @@ cleanlib: CmdTargetDict[CmdSign] =3D Item.replace(Temp, CmdS= ign) else: CmdTargetDict[CmdSign] =3D "%s %s" % (CmdTargetDic= t[CmdSign], SingleCommandList[-1]) Index =3D CommandList.index(Item) CommandList.pop(Index) - if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLAS= H, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])): + if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLAS= H, CmdSumDict[CmdSign[3:].rsplit(TAB_SLASH, 1)[0]])): Cpplist =3D CmdCppDict[T.Target.SubDir] Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' = % list(self.ObjTargetDict.keys()).index(T.Target.SubDir)) T.Commands[Index] =3D '%s\n\t%s' % (' \\\n\t'.join= (Cpplist), CmdTargetDict[CmdSign]) else: T.Commands.pop(Index) diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseT= ools/Source/Python/GenFds/GenFdsGlobalVariable.py index c9c476cf61..f43743dff4 100644 --- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py @@ -791,11 +791,14 @@ class GenFdsGlobalVariable: # @staticmethod def GetPcdValue (PcdPattern): if PcdPattern is None: return None - PcdPair =3D PcdPattern.lstrip('PCD(').rstrip(')').strip().split('.= ') + if PcdPattern.startswith('PCD('): + PcdPair =3D PcdPattern[4:].rstrip(')').strip().split('.') + else: + PcdPair =3D PcdPattern.strip().split('.') TokenSpace =3D PcdPair[0] TokenCName =3D PcdPair[1] =20 for Arch in GenFdsGlobalVariable.ArchList: Platform =3D GenFdsGlobalVariable.WorkSpace.BuildObject[GenFds= GlobalVariable.ActivePlatform, Arch, GenFdsGlobalVariable.TargetName, GenFd= sGlobalVariable.ToolChainTag] --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44070): https://edk2.groups.io/g/devel/message/44070 Mute This Topic: https://groups.io/mt/32544627/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-