ghc{843,861}: add musl variants of "llvm-targets" #43306
Merged
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.
Currently only the 3-element targets are available w/musl,
which is especially unfortunate since this means when
target'ing raspberryPi w/musl ("muslpi" in our tree)
GHC sees "armv6l-unknown-linux-musleabihf" and drops
the last bit, which is bad for two reasons:
armv6l-unknown-linux
,preventing compilation/use in this configuration.
at least in this style of target string.
I think the second reason is actually the explanation for the first,
and is why GHC special-cases "-gnueabi" which this PR extends
to similarly treat "-musleabi".
This only impacts GHC builds using musl, to avoid the rebuild (and following what was done for Android).
If later this is expanded I think only makes sense/has impact when LLVM is used,
so same configurations as in #43303.
I was "on the fence" with preserving "-musl*" (not just "-musleabi*") to ensure in a mixed
environment there's less confusion about how to extend/interpret "x86_64-unknown-linux",
but in the end decided to just match the "-gnueabi*" behavior and revisit if there's
motivation from experiences "in the wild".
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)Tested a number of configurations building basic packages (earlier today),
still rebuilding-all-the-haskell after a small rebase.
Inspected output of
${targetPrefix}ghc --info
, although I'm not a GHC expertbut things seem as they should be before/after.