gen_stubs: No compiler-rt hacks, more compact output, and more arch support#22049
Merged
andrewrk merged 7 commits intoziglang:masterfrom Nov 24, 2024
alexrp:musl-gen-stubs
Merged
gen_stubs: No compiler-rt hacks, more compact output, and more arch support#22049andrewrk merged 7 commits intoziglang:masterfrom alexrp:musl-gen-stubs
gen_stubs: No compiler-rt hacks, more compact output, and more arch support#22049andrewrk merged 7 commits intoziglang:masterfrom
alexrp:musl-gen-stubs
Conversation
Fixes musl libc.so compilation with zig cc.
The tool will now skip over undefined symbols. These can only occur as a result of building musl without compiler-rt, i.e. -rtlib=none. Thanks to this, it's no longer necessary to patch Zig's compiler-rt, nor is it necessary to maintain a symbol blacklist. See the updated instructions here: https://github.com/ziglang/zig/wiki/Updating-libc#updating-the-libcs-file Additionally, the tool now produces slightly more compact output by recognizing symbols that are defined for a single arch, for a family of arches, or only for arches using 32-bit or 64-bit time as their primary ABI. Finally, the tool now supports all architectures that we can emit code for, with the single exception of x86_64-linux-muslx32. (x32 currently fails with a ton of relocation errors, leading me to believe that it might be an LLVM or LLD bug.)
Also adjust ARCH_* logic for the updated gen_stubs.zig tool.
All supported architectures included except for x32 (currently broken).
Member
Author
|
@andrewrk this makes some major changes to |
Member
|
Great work! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resurrection of #20943. See commit messages for details.