Skip to content
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

WIP: haskell: Make linkWithGold use gold also for compiling Setup.hs #46482

Closed
wants to merge 1 commit into from

Conversation

@nh2
Copy link
Contributor

nh2 commented Sep 10, 2018

Motivation for this change

linkWithGold only uses ld.gold for the final link, not for building Setup.hs (which currently takes up to ~3 seconds on my machine for each Haskell package, which can add up to some time.)

This doesn't work yet

This is WIP because it segfaults.

If I try it on the hello Haskell package, I get a segfault when running ./Setup:

niklas@ares:/tmp/nix-build-hello-1.0.0.2.drv-1/hello-1.0.0.2$ ./Setup 
Segmentation fault (core dumped)

gdb shows:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff7ad0c81 in frame_dummy ()
   from /nix/store/254rgj92dhkyg7sydb7al65gflnyjd7b-gmp-6.1.2/lib/libgmp.so.10
#2  0x0000000000000000 in ?? ()

and when I compile with integer-simple:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000040ac7d in frame_dummy ()
#2  0x0000000000000000 in ?? ()

Not sure what's going on, why does the Setup segfault if linked with ld.gold?

CC @basvandijk @peti

@mmahut
Copy link
Member

mmahut commented Aug 25, 2019

Are there any updates on this pull request, please?

@cdepillabout
Copy link
Member

cdepillabout commented May 5, 2020

I believe everything is built with gold now, so this should be okay to close.

@nh2 please feel free to re-open if this PR is still relevant.

@nh2
Copy link
Contributor Author

nh2 commented May 5, 2020

We should probably link the related PRs, should be #80466 and the things linked in there.

@cdepillabout
Copy link
Member

cdepillabout commented May 5, 2020

Ah, yeah, sorry I should have linked that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.