From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.1260.1581059655565066700 for ; Thu, 06 Feb 2020 23:14:15 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: bob.c.feng@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2020 23:14:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,412,1574150400"; d="scan'208";a="404739112" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 06 Feb 2020 23:14:14 -0800 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 6 Feb 2020 23:14:13 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 7 Feb 2020 15:14:12 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.1713.004; Fri, 7 Feb 2020 15:14:12 +0800 From: "Bob Feng" To: "devel@edk2.groups.io" , "pierre.gondois@arm.com" CC: "Gao, Liming" , "Sami.Mujawar@arm.com" , "nd@arm.com" Subject: Re: [edk2-devel] [PATCH v3 2/2] BaseTools: Remove caret in NASM_INC macro Thread-Topic: [edk2-devel] [PATCH v3 2/2] BaseTools: Remove caret in NASM_INC macro Thread-Index: AQHV3QVirdExuvJo6kmUNNmz8S2Bk6gPUiJw Date: Fri, 7 Feb 2020 07:14:12 +0000 Message-ID: <260e8e0b8214418ea47b139b8c137fca@intel.com> References: <20200206155147.61112-1-pierre.gondois@arm.com> <20200206155147.61112-3-pierre.gondois@arm.com> In-Reply-To: <20200206155147.61112-3-pierre.gondois@arm.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzJmMzViMDctNGNkOC00N2FhLTkxNGItNjJiNmIxZjQ4MjYzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWnRFSXVzS3pXXC8zNG9YMWViRGZSS3pCVzFYYzVGRlJoVFppeFpxSzVuMXpyMExNeDV6cFZNTmpzejNuTkREZVUifQ== dlp-version: 11.2.0.6 dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Pierre, This patch cause UefiCpuPkg build fail. build -p UefiCpuPkg\UefiCpuPkg.dsc -a IA32 -t VS2015x86 Thanks, Bob -----Original Message----- From: devel@edk2.groups.io On Behalf Of PierreGondo= is Sent: Thursday, February 6, 2020 11:52 PM To: devel@edk2.groups.io Cc: Pierre Gondois ; Feng, Bob C ; Gao, Liming ; Sami.Mujawar@arm.com; pierre.gon= dois@arm.com; nd@arm.com Subject: [edk2-devel] [PATCH v3 2/2] BaseTools: Remove caret in NASM_INC m= acro From: Pierre Gondois NASM_INC contains the list of directory to include when using the nasm ass= embler. In nmake makefiles, a trailing backslash escapes the newline char and repl= aces it with a space ' '. To have a literal trailing backslash, it must be = escaped with a caret '^'. This is not necessary for GNU makefiles. On windows platforms, for the NASM_INC macro, a caret escaping a trailing = a backslash was appended to the last included folder regardless of the make= file type. For instance, "/Include/" was replaced by "/Include/^\". This is causing a build failure on windows platforms using GNU makefiles s= ince the caret '^' doesn't escape any chars in GNU makefiles and is thus co= nserved. "/Include^\" was replaced by "/Include\/" in nmake makefiles, but remained= "/Include/^\" in GNU makefiles. Escaping the trailing backslash in nmake makefiles on windows platforms is= not needed because: * folder names don't require to end with a slash '/' or a backslash '\'. * a trailing backslash replaces the newline char by a space ' ', which is not difference from a newline char in macros. Signed-off-by: Pierre Gondois --- BaseTools/Source/Python/AutoGen/GenMake.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source= /Python/AutoGen/GenMake.py index b036f726db144c13e98b9e0fb021cb3855ec8e55..b2b27d43fe18e89ebdfdf8456f= 439c52759a4d9e 100755 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -608,19 +608,10 @@ cleanlib: IncludePathList =3D [] asmsource =3D [item for item in MyAgo.SourceFileList if item.File= .upper().endswith((".NASM",".ASM",".NASMB","S"))] if asmsource: - for P in MyAgo.IncludePathList: + for P in MyAgo.IncludePathList: IncludePath =3D self._INC_FLAG_['NASM'] + self.PlaceMacro= (P, self.Macros) - if IncludePath.endswith(os.sep): - IncludePath =3D IncludePath.rstrip(os.sep) - # When compiling .nasm files, need to add a literal backs= lash at each path - # To specify a literal backslash at the end of the line, = precede it with a caret (^) - if P =3D=3D MyAgo.IncludePathList[-1] and os.sep =3D=3D '= \\': - IncludePath =3D ''.join([IncludePath, '^', os.sep]) - else: - IncludePath =3D os.path.join(IncludePath, '') - IncludePathList.append(IncludePath) + IncludePathList.append(os.path.join(IncludePath, '')) FileMacroList.append(self._FILE_MACRO_TEMPLATE.Replace({"macr= o_name": "NASM_INC", "source_file": IncludePathList})) - # Generate macros used to represent files containing list of inpu= t files for ListFileMacro in self.ListFileMacros: ListFileName =3D os.path.join(MyAgo.OutputDir, "%s.lst" % Lis= tFileMacro.lower()[:len(ListFileMacro) - 5]) -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'