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, haskell-infra: #40929 take 2 #40996
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.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
|
I merged the code to |
@peti Thank you! |
Hydra looks pretty good. I'm merging! |
Motivation for this change
@peti Pretty sure I fixed the paxmark issues, but there could be other issues.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)