forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Ghc cross #2
Merged
bolives-hax
merged 25 commits into
bolives-hax:nixos-s390x-native-dirty-test-fixes
from
sternenseemann:ghc-cross
Sep 3, 2024
Merged
Ghc cross #2
bolives-hax
merged 25 commits into
bolives-hax:nixos-s390x-native-dirty-test-fixes
from
sternenseemann:ghc-cross
Sep 3, 2024
Conversation
This file contains 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
This commit has been generated by maintainers/scripts/haskell/update-stackage.sh
This commit has been generated by maintainers/scripts/haskell/update-hackage.sh
This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh
haskellPackages.entropy: build with js backend
This is easy in comparison since these tools won't end up in GHC's settings nor need to be available at runtime, so we can use the *_FOR_BUILD environment variables. It is important to add buildCC to depsBuildBuild to engage the stdenv/wrapper script machinery properly. Co-authored-by: sternenseemann <[email protected]>
1. Explicitly set WITH_TERMINFO. We usually match GHC's behavior well, but it is better to tie the Nix option to make explicitly. Unfortunately, the same is very complicated to achieve with hadrian (iirc). 2. Disable enableTerminfo if we are cross-compiling. This matches the behavior of GHC's build system, so we'll have to match it now. It also reduces the ncurses-related headache a bit. 3. Stop passing --with-curses* flags. Unfortunately, GHC does not account for the fact that different platforms need different ncurses libraries. This is somewhat migitated by the fact that ncurses is only ever needed for the build platform if we are cross compiling, but I seem to remember it leaking into the final GHC somehow. A more reliable alternative is relying on the cc/ld wrapper scripts, as they'll always pull out the correct ncurses out of the environment when GHC's build system passes -lcurses. 4. Unconditionally add ncurses to depsBuildBuild. Stage0 unconditionally builds terminfo (maybe the stage1 compiler needs it?), so we need to make sure that ncurses for the build platform is available. Co-authored-by: sternenseemann <[email protected]>
Propagating the supported platforms of the boot compiler doesn't make much sense when unregistered cross-compilation is possible.
This is to ensure that Haskell users on platforms that lack official bindists still have a convenient means of getting GHC running natively. In my admittedly somewhat limited testing on RISC-V, GHC 8.10.7 is able to bootstrap native builds for 9.2.8 and 9.4.5. GHC 9.2.8 and 9.4.5 are unable to bootstrap themselves and 9.6.2 when cross-compiled. If you're looking at this commit to see whether you can safely upgrade the compiler used here to remove 8.10, please try cross-compiling 9.0 or later and then booting a native GHC with it.
bolives-hax
merged commit Sep 3, 2024
9c02e9a
into
bolives-hax:nixos-s390x-native-dirty-test-fixes
9 of 10 checks passed
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.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.