-
-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Fix various packages to build with mlibc #426772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
siraben
wants to merge
14
commits into
NixOS:staging
Choose a base branch
from
siraben:mlibc-fixes
base: staging
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,255
−15
Conversation
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
Previously gccWithoutTargetLibc was built with `langCC = false;`, which meant stdenvNoLibc had C++ support when not cross compiling or when the host platform toolchain is LLVM, but did not have C++ support when cross compiling for a non-Darwin and non-LLVM host platform. This patch enables langCC in gccWithoutTargetLibc for mlibc platforms, because mlibc is written in C++. Sadly enabling this for musl doesn't work so I've left a FIXME for someone else to look into it. This patch also runs autoreconf for gccWithoutTargetLibc, which is necessary to make libstdcxx disable link tests (which cannot be run without a libc). Co-Authored-By: Artturin <[email protected]> Co-Authored-By: Arsen Arsenović <[email protected]>
Checking if openssl is a derivation requires evaluating stdenv.cc, which depends on mlibc when cross compiling to a mlibc platform, which depends on meson, which depends on Python. See previous commit 0070883 on why the recursion break happens in the Python expression.
In gcc, libsanitizer is disabled because mlibc doesn't support libsanitizer yet but upstream is working on it. Patches needed for gcc to support linux-mlibc targets are pulled from managarm's fork of gcc, patches only needed by managarm are not applied. Also includes some refactoring around the `--disable-libsanitizer` configure flag.
It's only glibc with a quirk that makes it bad at static linking. mlibc, LLVM libc, and others are just fine with static linking.
This hack was removed recently. The comment doesn't describe anything useful now.
For most tests, I'd rather fix what makes them not pass then disable tests (except when absolutely necessary) |
Alright, I'll go through the ones that disable tests due to mlibc and revert those. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: lib
The Nixpkgs function library
6.topic: python
Python is a high-level, general-purpose programming language.
10.rebuild-darwin: 501+
This PR causes many rebuilds on Darwin and should normally target the staging branches.
10.rebuild-darwin: 5001+
This PR causes many rebuilds on Darwin and must target the staging branches.
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild on Darwin and must target a staging branch.
10.rebuild-linux: 501+
This PR causes many rebuilds on Linux and should normally target the staging branches.
10.rebuild-linux: 5001+
This PR causes many rebuilds on Linux and must target the staging branches.
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.
Things done
Depends on #371092. Begin fixing builds on various packages built with mlibc. I'm not sure if this is the best pattern to use. cc @lzcunt
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.