From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@apple.com header.s=20180706 header.b=bIdbvBEf; spf=pass (domain: apple.com, ip: 17.151.62.67, mailfrom: afish@apple.com) Received: from nwk-aaemail-lapp02.apple.com (nwk-aaemail-lapp02.apple.com [17.151.62.67]) by groups.io with SMTP; Tue, 07 May 2019 19:01:41 -0700 Received: from pps.filterd (nwk-aaemail-lapp02.apple.com [127.0.0.1]) by nwk-aaemail-lapp02.apple.com (8.16.0.27/8.16.0.27) with SMTP id x481l8IP021921; Tue, 7 May 2019 19:01:41 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=mime-version : content-type : sender : from : message-id : subject : date : in-reply-to : cc : to : references; s=20180706; bh=WuBRHfRD44OprNUla2pSS5qk4zEfQnCIVYaqjYZstUM=; b=bIdbvBEfD7jqWM2uNQYQWMFnlGN6N+lBuGl1QIZpW7q+E7QGpB4m/HOsE3kheXLDjy7L gLIkMrPodlIO4kFLx/EIBcjeRf4XyaNnhGOlmWIJHg8Ks0I61JheqdBum9029Ba0BGu0 c8wc0EpO9A/xfP4rNiiqVTJBBhoQDTIOOjxvQsycB2+4QDeL++P4tm1zkw4DswB2VE0P gSpRMOJhS0KIf+8gc5D+XI4+9bEalXhvwIt+/pINO/m30Uq/j6/Vls2+wfG1tx9npS4Q eziOXV9LPTMpcihnYTne+AQx43o/UKIaE6VI8TARRTn5isXuWEFKtr9Fz4nw8R+CFJbC Ag== Received: from ma1-mtap-s03.corp.apple.com (ma1-mtap-s03.corp.apple.com [17.40.76.7]) by nwk-aaemail-lapp02.apple.com with ESMTP id 2s97ahjvc9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Tue, 07 May 2019 19:01:40 -0700 MIME-version: 1.0 Received: from nwk-mmpp-sz10.apple.com (nwk-mmpp-sz10.apple.com [17.128.115.122]) by ma1-mtap-s03.corp.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPS id <0PR5000YRXMRWX60@ma1-mtap-s03.corp.apple.com>; Tue, 07 May 2019 19:01:40 -0700 (PDT) Received: from process_milters-daemon.nwk-mmpp-sz10.apple.com by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) id <0PR500L00XLZGQ00@nwk-mmpp-sz10.apple.com>; Tue, 07 May 2019 19:01:39 -0700 (PDT) X-Va-A: X-Va-T-CD: 17e290161afadc43df911743530be568 X-Va-E-CD: cc9402d0a6211c664e189619ee1fe487 X-Va-R-CD: 0dad72254792c385e1dc205ddae095c4 X-Va-CD: 0 X-Va-ID: 02a2a5b1-930d-41c1-ad88-d40983b54dc8 X-V-A: X-V-T-CD: 17e290161afadc43df911743530be568 X-V-E-CD: cc9402d0a6211c664e189619ee1fe487 X-V-R-CD: 0dad72254792c385e1dc205ddae095c4 X-V-CD: 0 X-V-ID: 5b3c9baa-4675-42b0-8a7c-a05580afd23a X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-08_02:,, signatures=0 Received: from [17.235.21.233] (unknown [17.235.21.233]) by nwk-mmpp-sz10.apple.com (Oracle Communications Messaging Server 8.0.2.3.20181024 64bit (built Oct 24 2018)) with ESMTPSA id <0PR5003U6XMP1C90@nwk-mmpp-sz10.apple.com>; Tue, 07 May 2019 19:01:39 -0700 (PDT) Sender: afish@apple.com From: "Andrew Fish" Message-id: <55FC6AA1-43B5-4557-8A17-0E3B00E3EE9A@apple.com> Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes Date: Tue, 07 May 2019 19:01:26 -0700 In-reply-to: <20190507144002.gq3rdtappd3rupmd@bivouac.eciton.net> Cc: zhijux.fan@intel.com, "Gao, Liming" , "Feng, Bob C" To: devel@edk2.groups.io, Leif Lindholm References: <5C1A24BA-648D-4A3F-AE88-034073AB5C13@apple.com> <20190507144002.gq3rdtappd3rupmd@bivouac.eciton.net> X-Mailer: Apple Mail (2.3445.6.18) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-08_01:,, signatures=0 Content-type: multipart/alternative; boundary="Boundary_(ID_VDseZHC9OCpX4R3RXczpsA)" --Boundary_(ID_VDseZHC9OCpX4R3RXczpsA) Content-type: text/plain; CHARSET=US-ASCII Content-transfer-encoding: 7BIT > On May 7, 2019, at 7:40 AM, Leif Lindholm wrote: > > Hi Fan Zhiju, > > But where does the string come from that contains a .C suffix? > Is the tool internally converting things to uppercase, or is some > source file in the build incorrectly named? > Leif, Our build system defines .C as correct! I think it has been that way a very long time. https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/build_rule.template#L109 [C-Code-File] ?.c ?.C ?.cc ?.CC ?.cpp ?.Cpp ?.CPP Thanks, Andrew Fish > I am asking because it is not clear to me whether the patch resolves a > problem or hides one. > > Best Regards, > > Leif > > On Tue, May 07, 2019 at 03:05:02AM +0000, Fan, ZhijuX wrote: >> This problem has nothing to do with the file system, We just use the >> filename as a string to compare with other strings >> Our unittest tested minplatform, Ovmf. This problem was found when >> building a platform inside Intel. >> We've tested it on Linux and Windows. >> >> Any question, please let me know. Thanks. >> >> Best Regards >> Fan Zhiju >> >> -----Original Message----- >> From: afish@apple.com [mailto:afish@apple.com] >> Sent: Tuesday, May 7, 2019 10:31 AM >> To: devel@edk2.groups.io; Fan, ZhijuX >> Cc: Gao, Liming ; Feng, Bob C >> Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffixes >> >> This brings up a question? Do we tests on a file system that is case sensitive? Is this just lack of a test case? >> >> Thanks, >> >> Andrew Fish >> >>> On May 6, 2019, at 7:22 PM, Fan, ZhijuX wrote: >>> >>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773 >>> >>> Build break if C file suffixes of named .C instead of .c Code not >>> recognize filenames with .C suffixes. >>> >>> This patch adds code to Support both .c file and .C file >>> >>> Cc: Bob Feng >>> Cc: Liming Gao >>> Signed-off-by: Zhiju.Fan >>> --- >>> BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py >>> b/BaseTools/Source/Python/AutoGen/GenMake.py >>> index 0e0f9fd9b0..858ddedf8e 100644 >>> --- a/BaseTools/Source/Python/AutoGen/GenMake.py >>> +++ b/BaseTools/Source/Python/AutoGen/GenMake.py >>> @@ -1035,7 +1035,8 @@ cleanlib: >>> CmdTargetDict[CmdSign] = "%s %s" % (CmdTargetDict[CmdSign], SingleCommandList[-1]) >>> Index = CommandList.index(Item) >>> CommandList.pop(Index) >>> - if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])): >>> + if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDict[T.Target.SubDir])) or \ >>> + SingleCommandList[-1].endswith("%s%s.C" % (TAB_SLASH, CmdSumDict[T.Target.SubDir])): >>> Cpplist = CmdCppDict[T.Target.SubDir] >>> Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' % list(self.ObjTargetDict.keys()).index(T.Target.SubDir)) >>> T.Commands[Index] = '%s\n\t%s' % (' >>> \\\n\t'.join(Cpplist), CmdTargetDict[CmdSign]) >>> -- >>> 2.14.1.windows.1 >>> >>> >>> >>> >>> >> >> >> >> > > --Boundary_(ID_VDseZHC9OCpX4R3RXczpsA) Content-type: text/html; CHARSET=US-ASCII Content-transfer-encoding: quoted-printable
On May 7,= 2019, at 7:40 AM, Leif Lindholm <leif.lindholm@linaro.org> wrote:

Hi Fan Zhiju,

But where does the string come from that contains a .C suffix?
Is the tool internally conve= rting things to uppercase, or is some
source file in the build incorrectly named?


Leif,

Our build system defines .C as correct! I think it has been tha= t way a very long time. 


<= div>
[C-Code-File]
<InputFile>
?.c
?.C
?.cc
?.CC
?.cpp
?.Cpp
?.CPP

Thanks,

Andrew Fish


I am asking because it is not clear to me whe= ther the patch resolves a
problem or hides one.

Best Regards,

Lei= f

On Tue, May 07, 2019 at 03:05:02AM +0000, Fan, ZhijuX wro= te:
This p= roblem has nothing to do with the file system, We just use the
filename as a string to compare with other strings
Our unit= test tested minplatform, Ovmf. This problem was found when
bu= ilding a platform inside Intel.
We've tested it on Linux and = Windows.

Any question, please let me know. Tha= nks.

Best Regards
Fan Zhiju

-----Original Message-----
From: afish@apple.com [mailto:afish@apple.com] 
Sent: Tuesday, May = 7, 2019 10:31 AM
To: devel@edk2.groups.io; Fan, ZhijuX <zhijux.fan@intel.com>
Cc:= Gao, Liming <liming.= gao@intel.com>; Feng, Bob C <bob.c.feng@intel.com>
Subject: Re: [edk= 2-devel] [PATCH V2] BaseTools:improve code to support C files with .C suffi= xes

This brings up a question? Do we tests on = a file system that is case sensitive? Is this just lack of a test case?

Thanks,

Andrew Fish<= br class=3D"">
On May 6,= 2019, at 7:22 PM, Fan, ZhijuX <zhijux.fan@intel.com> wrote:

BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1773

Build break if C file suffixes of named .C instead of= .c Code not 
recognize filenames with .C suffixes.

This = patch adds code to Support both .c file and .C file

Cc: Bob Feng <= bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com>
---
Ba= seTools/Source/Python/AutoGen/GenMake.py | 3 ++-
1 file chang= ed, 2 insertions(+), 1 deletion(-)

diff --git = a/BaseTools/Source/Python/AutoGen/GenMake.py 
b/BaseTools/Source/Python/AutoGen/GenMak= e.py
index 0e0f9fd9b0..858ddedf8e 100644
--- a/= BaseTools/Source/Python/AutoGen/GenMake.py
+++ b/BaseTools/So= urce/Python/AutoGen/GenMake.py
@@ -1035,7 +1035,8 @@ cleanlib= :
          = ;            &n= bsp;CmdTargetDict[CmdSign] =3D "%s %s" % (CmdTargetDict[CmdSign], SingleCom= mandList[-1])
        = ;           Index = =3D CommandList.index(Item)
     &n= bsp;            = ; CommandList.pop(Index)
-      = ;            &n= bsp; if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH, CmdSumDi= ct[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):
+  =             &nb= sp;     if SingleCommandList[-1].endswith("%s%s.c"= % (TAB_SLASH, CmdSumDict[T.Target.SubDir])) or \
+  &nb= sp;            =             &nb= sp;SingleCommandList[-1].endswith("%s%s.C" % (TAB_SLASH, CmdSumDict[T.Targe= t.SubDir])):
        =             &nb= sp;  Cpplist =3D CmdCppDict[T.Target.SubDir]
 =             &nb= sp;         Cpplist.insert(0, = '$(OBJLIST_%d): $(COMMON_DEPS)' % list(self.ObjTargetDict.keys()).index(T.T= arget.SubDir))
       &nbs= p;            &= nbsp;  T.Commands[Index] =3D '%s\n\t%s' % (' 
\\\n\t'.join(Cpplist), CmdTarg= etDict[CmdSign])
--
2.14.1.windows.1




<winm= ail.dat>






--Boundary_(ID_VDseZHC9OCpX4R3RXczpsA)--