Conversation
Member
Author
|
As part of this process I have uploaded 3 tarballs of glibc compiled for all targets: |
69be412 to
b33e65f
Compare
Contributor
generated from the latest commits of ziglang/glibc-abi-tool which contains glibc 2.35, 2.36, 2.37, and 2.38.
I went ahead and left the README.md file deleted because it had broken git hashes. Better to use `git log -- lib/libc/glibc/` to find out the patches.
so let's not include those headers until more investigation happens.
Instead Zig passes it based on the target.
This is a patch to glibc features.h which makes _DYNAMIC_STACK_SIZE_SOURCE undefined unless the version is >= 2.34. This feature was introduced with glibc 2.34 and without this patch, code built against these headers but then run on an older glibc will end up making a call to sysconf() that returns -1 for the value of SIGSTKSZ and MINSIGSTKSZ.
- `fcntl` was renamed to `fcntl64` in glibc 2.28 (see #9485) - `res_{,n}{search,query,querydomain}` became "their own" symbols since glibc 2.34: they were prefixed with `__` before. This PR makes it possible to use `fcntl` with glibc 2.27 or older and the `res_*` functions with glibc 2.33 or older. These patches will become redundant with universal-headers and can be dropped. But we have to do with what we have now.
This is necessary to build glib.
I could have just included the file from upstream glibc, but it was too silly so I just inlined it. This patch could be dropped in a future glibc update if desired. If omitted it will cause easily solvable C compilation failures building glibc nonshared.
instead of importing every header file under the sun, I copied a couple inline functions into these files to make them work.
I don't know where glibc thinks uintptr_t is coming from, but here it is.
This is the only place in all of glibc that this macro is referenced. What is it doing? Only preventing fstatat.c from knowing the type definition of `__time64_t`, apparently. Fixes compilation of fstatat.c on 32-bit x86.
These are tripping on 32-bit x86 but are intended to prevent glibc itself from being built with a bad configuration. Zig is only using this file to create libc_nonshared.a, so it's not relevant.
b33e65f to
701ef1f
Compare
Member
Author
|
All these checks pass: These architectures correspond to the test matrix in test/tests.zig. Next I will run the behavior tests and std lib tests against the full test matrix for glibc 2.38. |
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.
Merge Checklist
git log -- lib/libc/glibc lib/libc/includeand look for glibc patches and reapply them.Closes #12808
Closes #12809
Closes #14798
Closes #16668