-
Notifications
You must be signed in to change notification settings - Fork 697
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
Chain configuration of ldProgram #9270
Conversation
969b58e
to
8c0b0d5
Compare
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.
Much gried was caused by Distribution.Simple.GHC.Internal
overriding programPostConf
set in Distribution.Simple.Program.Builtin
.
I cannot shake the feeing this is an area that could be improved but this is ok for now IMHO.
ee1fe1b
to
ce4a84d
Compare
Is there an issue ticket connected to this PR? If not, could you add some motivation and explanation to the PR description? Thank you. |
@erikd I understand this is a part of a series of patches towards a goal but @Mikolaj is right in pointing out it's not clear where this goal is explicitated :) I found these links Could you write a summary of what you are aiming for? |
@Mikolaj @andreabedini The main issue is that the Does that clear things up? |
This PR makes cabal agnostic to the linker. For GHCs using lld it will not try to create relocatabled pre-linked ghci libs. For GHCs using GNU ld (or any other linker that supports -r, potentially lld in the future) it permits the creation pre-linked ghci objects. These are significantly faster to load wirh our static rts linker in GHC. While GHC linked to control the toolchain it ships with for native deployments. This PR makes cabal agnostic to the used toolchain, and especially prevents breakage for cross compiled GHCs when using the gun toolchain. |
ce4a84d
to
0cead37
Compare
Rebased and force pushed. |
|
791495f
to
79162ee
Compare
c3800d6
to
60076d0
Compare
@erikd, can you please edit the MR description to provide an overview of what issue this MR addresses and how it does so? |
9c9cfdf
to
635c854
Compare
6f35659
to
d2f40f8
Compare
d2f40f8
to
eb8e6d5
Compare
1ed5b6a
to
baec786
Compare
baec786
to
b72fa3a
Compare
Standard GNU `ld` ues `--relocatable` while `ld.gold` uses a `-relocatable` flag (with a single `-`). Code will now detect both versions.
`ldProgram` gets configured in two places, a seemingly default and a GHC specific version. The later needs to be updated so that it first calls the default configuration and then the new GHC version.
The `lld` linker (commonly used on Windows) does not support relocatable output. Closes: haskell#9414
* Update ghc versions used. * Disable huge number of failing test for ghc == 9.4.* on Windows.
b72fa3a
to
341b5b0
Compare
Hope to replace this PR with #9443 |
This is redundant now that #9443 is merged. |
Cabal currently adds the
-r
(relocatable) flag to some invocations ofldProgram
, butlld
(commonly used on WIndows) does not understand the-r
flag. This PR just detects ifldProgram
accepts-r
and conditionally adds it, only if it is supported.Include the following checklist in your PR:
Bonus points for added automated tests!