ghc, haskell-infra: #40929 take 2#40996
Merged
Ericson2314 merged 12 commits intoNixOS:masterfrom May 25, 2018
Merged
Conversation
Just like with the other `--extra-*` flags, cc/ld-wrapper already handles this, but we need to make Cabal aware so that the haskell builds have the correct metadata.
…Inputs This is because they are just for Setup.hs, so they are just used at build time and completely isolated from the normal components' dependencies. This was previous implemented in 8a8f040, but reverted in e69c7f5 because it broken setup-depends non-cross in haskell shell environments (custom Setup.hs in cross shell environments has never worked). This version adds a special native exception to avoid that breakage.
…taticlib The reason why this does not work is not that we can't built static objects, we can, but we can't use `-staticlib` on GHC on windows. `-staticlib` rolls all dependencies into a combined archive. While this would work on windows if we used gnu ar and MRI script, GHC can't rely on GNU ar, and as such has a quick archive concatenation module for GNU and BSD archives only.
Shell glob works even as the exact set of executable (filenames) varries beween configuations. Need to skip non ELFs (e.g. shell scripts), however.
nixpkgs#37012 and nixpkgs#37707 introduces the setup-hooks for libiconv, which inject `-liconv` into the `NIX_LDFLAGS`. This breaks horribly on windows where the linker end up having no idea how to linke `-liconv`. The configure.ac file specifically ignores libiconv on windows.
Ericson2314
commented
May 23, 2018
| postInstall = '' | ||
| paxmark m $out/lib/${name}/bin/${if targetPlatform != hostPlatform then "ghc" else "{ghc,haddock}"} | ||
| for bin in "$out"/lib/${name}/bin/*; do | ||
| isELF "$bin" || continue |
Member
Author
There was a problem hiding this comment.
This should fix the build failure.
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: ghc Partial log (click to expand)
|
|
Success on x86_64-linux (full log) Attempted: ghc Partial log (click to expand)
|
|
Failure on x86_64-darwin (full log) Attempted: ghc Partial log (click to expand)
|
Member
|
I merged the code to |
Member
Author
|
@peti Thank you! |
Member
Author
|
Hydra looks pretty good. I'm merging! |
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.
Motivation for this change
@peti Pretty sure I fixed the paxmark issues, but there could be other issues.
Things done
build-use-sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)