public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v1 0/1] BaseTools/Trim: Canonicalize filepaths to fix comparison
@ 2018-06-27  3:58 Chris Co
  2018-06-27  3:58 ` [PATCH v1 1/1] " Chris Co
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Co @ 2018-06-27  3:58 UTC (permalink / raw)
  To: edk2-devel@lists.01.org; +Cc: Leif Lindholm, Yonghong Zhu, Liming Gao

REF: https://github.com/christopherco/edk2/tree/trim_gcc_v1

When using Linaro GCC5+ arm-eabi toolchain on Windows, the generated
DSDT.iii contains a canonicalized ("\.\" removed and lower case)
filepath for the preprocessed DSDT.i file in the first line.
Due to this, when Trim.exe is called to generate DSDT.iiii, future
filepath comparisons against this canonicalized filepath, which
should match, actually fail the comparison which results in an
empty DSDT.iiii.

Issue was first reported to Linaro here:
https://bugs.linaro.org/show_bug.cgi?id=2909
where the recommendation was to address the issue in Trim.exe.

This patch canonicalizes and lower cases all file paths encountered
during trim execution on preprocessed files.  Since file paths are
standarized, the comparison succeeds for files that should match
regardless of the presence of upper case or "\.\" characters in
the file path.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Christopher Co <christopher.co@microsoft.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>


Christopher Co (1):
  BaseTools/Trim: Canonicalize filepaths to fix comparison

 BaseTools/Source/Python/Trim/Trim.py | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.16.2.gvfs.1.33.gf5370f1



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-06-28 13:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27  3:58 [PATCH v1 0/1] BaseTools/Trim: Canonicalize filepaths to fix comparison Chris Co
2018-06-27  3:58 ` [PATCH v1 1/1] " Chris Co
2018-06-27  6:59   ` Gao, Liming
2018-06-27  9:43   ` Leif Lindholm
2018-06-27 11:35   ` Evan Lloyd
2018-06-27 18:13     ` Chris Co
2018-06-27 18:23       ` Chris Co
2018-06-27 20:03         ` Chris Co
2018-06-28 10:35           ` Evan Lloyd
2018-06-28 13:40             ` Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox