Bug 22823 – dmd.root.file: File.read fails to read any file on PPC

Status
RESOLVED
Resolution
FIXED
Severity
blocker
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
PowerPC
OS
Linux
Creation time
2022-02-25T09:20:57Z
Last change time
2022-02-26T12:52:31Z
Keywords
pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2022-02-25T09:20:57Z
Because of issue 22822, the dmd.root.file module is broken on PPC. The `st_size` field it reads is actually at the offset of padding, so it thinks that every file has a size of 0, meaning nothing gets read into the parser, and nothing written out by the compiler. We can fix druntime, but all previous releases are still broken, so we need to "workaround" this issue in the compiler front-end itself by providing a stub implementation of stat_t to use on linux/PPC only.
Comment #1 by dlang-bot — 2022-02-25T13:43:18Z
@ibuclaw created dlang/dmd pull request #13719 "fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC" fixing this issue: - fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC https://github.com/dlang/dmd/pull/13719
Comment #2 by dlang-bot — 2022-02-26T12:52:31Z
dlang/dmd pull request #13719 "fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC" was merged into master: - 8d7b3963082e0f99cab256f79e9ed96efeb90e8e by Iain Buclaw: fix Issue 22823 - dmd.root.file: File.read fails to read any file on PPC https://github.com/dlang/dmd/pull/13719