Re:When can glibc be built with Clang?
by williamstein on Wednesday October 13, 2021 @05:46PM
(#28858096)
Zig builds its own copy of glibc with clang on a whole bunch of architectures: https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
[ Parent
| on HN ]
Are you sure about that?
> And finally, we certainly do not ship the build system of glibc with Zig! I manually inspected, audited, and analyzed glibc's build system, and then by hand wrote code in the Zig compiler which hooks into Zig's caching system and performs a minimal build of only these start files, as needed.
It sounds to me like they build glibc using its own build system, but they use Zig to build the statically-linked glue code necessary to dynamically link to a system glibc. This allows cross-compiling to a glibc target without having glibc installed locally. Certainly very impressive.
Re:When can glibc be built with Clang?
by williamstein on Thursday October 14, 2021 @12:45PM
(#28866642)
You’re right - Many thanks for the clarification.