<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 8, 2019, at 5:08 AM, Leif Lindholm <<a href="mailto:leif.lindholm@linaro.org" class="">leif.lindholm@linaro.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Hi Fan Zhiju,</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">I understand your reasoning, but that strengthens my view that we</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">should leave this change out.</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Actually, could we consider *dropping* support for .C files</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">altogether, since we are striving to support multiple toolchains, and</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">the two major families of toolchains we use consider .C files to be</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">fundamentally different things?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Andrew, Laszlo, Mike?</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""></div></blockquote><div><br class=""></div><div>Leif,</div><div><br class=""></div><div>I missed that ARM had extra restrictions on file extensions. </div><div><br class=""></div><div><div>[C-Code-File]</div><div>    <InputFile></div><div>        ?.c</div><div>        ?.C</div><div>        ?.cc</div><div>        ?.CC</div><div>        ?.cpp</div><div>        ?.Cpp</div><div>        ?.CPP</div><div><br class=""></div><div>[C-Code-File.BASE.AARCH64,C-Code-File.SEC.AARCH64,C-Code-File.PEI_CORE.AARCH64,C-Code-File.PEIM.AARCH64,C-Code-File.BASE.ARM,C-Code-File.SEC.ARM,C-Code-File.PEI_CORE.ARM,C-Code-File.PEIM.ARM]</div><div>    <InputFile></div><div>        ?.c</div><div class=""></div></div><div></div><div><br class=""></div><div>I think there are people who try to roll there own C++ support  and that is why the build system will pass the C++ files to the C compiler. </div><div><br class=""></div><div>At this point I think we should probably act more like a compiler. First add a warning, and down the road remove the support?</div><div><br class=""></div><div>Thanks,</div><div><br class=""></div><div>Andrew Fish</div><br class=""><blockquote type="cite" class=""><div class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Best Regards,</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Leif</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">On Wed, May 08, 2019 at 10:57:09AM +0000, Fan, ZhijuX wrote:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Hi Leif,<br class=""><br class="">This patch is going to fix the bug in commit 05217d210e.<br class="">this patch and commit 05217d210e is just for MSVC. It doesn't have any effect on GCC.<br class="">this patch does not imply to compile .C as C instead of C++.<br class="">We just found out that they build break because the.C file was in the source file,<br class="">But the MSVC compiler allows.C files,So I fixed this bug to Change the original logic to support.C files.<br class=""><br class=""><br class="">Any question, please let me know. Thanks.<br class=""><br class="">Best Regards<br class="">Fan Zhiju<br class=""><br class=""><br class=""><br class=""><br class=""><blockquote type="cite" class="">-----Original Message-----<br class="">From: Leif Lindholm [<a href="mailto:leif.lindholm@linaro.org" class="">mailto:leif.lindholm@linaro.org</a>]<br class="">Sent: Wednesday, May 8, 2019 5:09 PM<br class="">To: Andrew Fish <<a href="mailto:afish@apple.com" class="">afish@apple.com</a>><br class="">Cc: <a href="mailto:devel@edk2.groups.io" class="">devel@edk2.groups.io</a>; Fan, ZhijuX <<a href="mailto:zhijux.fan@intel.com" class="">zhijux.fan@intel.com</a>>; Gao, Liming<br class=""><<a href="mailto:liming.gao@intel.com" class="">liming.gao@intel.com</a>>; Feng, Bob C <<a href="mailto:bob.c.feng@intel.com" class="">bob.c.feng@intel.com</a>><br class="">Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to support C<br class="">files with .C suffixes<br class=""><br class="">On Tue, May 07, 2019 at 07:01:26PM -0700, Andrew Fish wrote:<br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class="">On May 7, 2019, at 7:40 AM, Leif Lindholm <<a href="mailto:leif.lindholm@linaro.org" class="">leif.lindholm@linaro.org</a>><br class=""></blockquote></blockquote>wrote:<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">Hi Fan Zhiju,<br class=""><br class="">But where does the string come from that contains a .C suffix?<br class="">Is the tool internally converting things to uppercase, or is some<br class="">source file in the build incorrectly named?<br class=""><br class=""></blockquote><br class="">Leif,<br class=""><br class="">Our build system defines .C as correct! I think it has been that way a very<br class=""></blockquote>long time.<br class=""><br class="">.C is valid, but at least for GCC it is equivalent to all of the other non-.c<br class="">options - i.e., interpret as c++. Which is why I am wondering about the case<br class="">that ends up with the build system internally processing this.<br class=""><br class="">If it is changed to permitting .C files to be compiled as C instead of<br class="">C++ (which the patch seems to imply), that sounds incorrect to me.<br class=""><br class="">/<br class="">   Leif<br class=""><br class=""><blockquote type="cite" class=""><br class=""></blockquote><a href="https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/build_rul" class="">https://github.com/tianocore/edk2/blob/master/BaseTools/Conf/build_rul</a><br class=""><blockquote type="cite" class="">e.template#L109<br class=""><br class="">[C-Code-File]<br class="">   <InputFile><br class="">       ?.c<br class="">       ?.C<br class="">       ?.cc<br class="">       ?.CC<br class="">       ?.cpp<br class="">       ?.Cpp<br class="">       ?.CPP<br class=""><br class="">Thanks,<br class=""><br class="">Andrew Fish<br class=""><br class=""><br class=""><blockquote type="cite" class="">I am asking because it is not clear to me whether the patch resolves<br class="">a problem or hides one.<br class=""><br class="">Best Regards,<br class=""><br class="">Leif<br class=""><br class="">On Tue, May 07, 2019 at 03:05:02AM +0000, Fan, ZhijuX wrote:<br class=""><blockquote type="cite" class="">This problem has nothing to do with the file system, We just use<br class="">the filename as a string to compare with other strings Our unittest<br class="">tested minplatform, Ovmf. This problem was found when building a<br class="">platform inside Intel.<br class="">We've tested it on Linux and Windows.<br class=""><br class="">Any question, please let me know. Thanks.<br class=""><br class="">Best Regards<br class="">Fan Zhiju<br class=""><br class="">-----Original Message-----<br class="">From: afish@apple.com [mailto:afish@apple.com]<br class="">Sent: Tuesday, May 7, 2019 10:31 AM<br class="">To: devel@edk2.groups.io; Fan, ZhijuX <zhijux.fan@intel.com><br class="">Cc: Gao, Liming <liming.gao@intel.com>; Feng, Bob C<br class=""><bob.c.feng@intel.com><br class="">Subject: Re: [edk2-devel] [PATCH V2] BaseTools:improve code to<br class="">support C files with .C suffixes<br class=""><br class="">This brings up a question? Do we tests on a file system that is case<br class=""></blockquote></blockquote></blockquote>sensitive? Is this just lack of a test case?<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><br class="">Thanks,<br class=""><br class="">Andrew Fish<br class=""><br class=""><blockquote type="cite" class="">On May 6, 2019, at 7:22 PM, Fan, ZhijuX <zhijux.fan@intel.com> wrote:<br class=""><br class="">BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1773<br class=""><br class="">Build break if C file suffixes of named .C instead of .c Code not<br class="">recognize filenames with .C suffixes.<br class=""><br class="">This patch adds code to Support both .c file and .C file<br class=""><br class="">Cc: Bob Feng <bob.c.feng@intel.com><br class="">Cc: Liming Gao <liming.gao@intel.com><br class="">Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com><br class="">---<br class="">BaseTools/Source/Python/AutoGen/GenMake.py | 3 ++-<br class="">1 file changed, 2 insertions(+), 1 deletion(-)<br class=""><br class="">diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py<br class="">b/BaseTools/Source/Python/AutoGen/GenMake.py<br class="">index 0e0f9fd9b0..858ddedf8e 100644<br class="">--- a/BaseTools/Source/Python/AutoGen/GenMake.py<br class="">+++ b/BaseTools/Source/Python/AutoGen/GenMake.py<br class="">@@ -1035,7 +1035,8 @@ cleanlib:<br class="">                      CmdTargetDict[CmdSign] = "%s %s" %<br class=""></blockquote></blockquote></blockquote></blockquote>(CmdTargetDict[CmdSign], SingleCommandList[-1])<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">                  Index = CommandList.index(Item)<br class="">                  CommandList.pop(Index)<br class="">-                    if SingleCommandList[-1].endswith("%s%s.c" % (TAB_SLASH,<br class=""></blockquote></blockquote></blockquote></blockquote>CmdSumDict[CmdSign.lstrip('/Fo').rsplit(TAB_SLASH, 1)[0]])):<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">+                    if SingleCommandList[-1].endswith("%s%s.c" %<br class=""></blockquote></blockquote></blockquote></blockquote>(TAB_SLASH, CmdSumDict[T.Target.SubDir])) or \<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">+                            SingleCommandList[-1].endswith("%s%s.C" %<br class=""></blockquote></blockquote></blockquote></blockquote>(TAB_SLASH, CmdSumDict[T.Target.SubDir])):<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">                      Cpplist = CmdCppDict[T.Target.SubDir]<br class="">                      Cpplist.insert(0, '$(OBJLIST_%d): $(COMMON_DEPS)' %<br class=""></blockquote></blockquote></blockquote></blockquote>list(self.ObjTargetDict.keys()).index(T.Target.SubDir))<br class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class=""><blockquote type="cite" class="">                      T.Commands[Index] = '%s\n\t%s' % ('<br class="">\\\n\t'.join(Cpplist), CmdTargetDict[CmdSign])<br class="">--<br class="">2.14.1.windows.1<br class=""><br class=""><br class=""><br class=""><br class=""><winmail.dat><br class=""></blockquote><br class=""><br class=""><br class=""><br class=""></blockquote><br class=""><br class=""></blockquote><br class=""></blockquote></blockquote></blockquote><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=""></span></div></blockquote></div><br class=""></body></html>

<div width="1" style="color:white;clear:both">_._,_._,_</div>
<hr>
Groups.io Links:<p>

You receive all messages sent to this group.


<p>

<a target="_blank" href="https://edk2.groups.io/g/devel/message/40205">View/Reply Online (#40205)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/31539232/1813853">Mute This Topic</a>
  

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>



<br>

<a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> |
<a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |

<a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>

 [edk2-devel-archive@redhat.com]<br>
<div width="1" style="color:white;clear:both">_._,_._,_</div>