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

fix: not use ld.gold on aarch32 #548

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

michivi
Copy link
Contributor

@michivi michivi commented Apr 17, 2020

It seems that ld.gold is responsible for cross-compiled programs (from x86_64 to armv6l with Linux at the very least) to segfault before having a chance to actually start when using the perf-cross flavour. That includes the instance of remote-iserv used during cross-compilation.

Returning to ld seems to fix that issue, and compiled programs run just fine with perf-cross. However, I can't find the reference to the reason why in some cases ld.gold is actually required anymore. So maybe this PR is not suited for every cases? However it runs fine on a cross-compilation scenario to armv6l with ffi interactions. So at the very least, if the PR can help...

A reference to an issue that may be linked, though I'm not quite sure (I'm not using musl, and my segfault event doesn't look like the one referenced in the issue):
NixOS/nixpkgs#49071

On another note, without this PR, I've managed to get some cross-compiled programs to partially work (they do start, but segfault on some other parts) by modifying the compilation flags. But after experimenting, I've stumbled upon some issues in the GHC issue tracker that kind of look like what was happening, so perhaps this issue is already investigated?

Have a nice day!

It seems that using ld.gold for cross-compilation to aarch32 results in Haskell programs segfaulting when launched.
@hamishmack
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Apr 17, 2020
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Apr 17, 2020

@hamishmack hamishmack merged commit dc3d1a7 into input-output-hk:master Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants