Gold linker fails
When using gold linker in the project, the compilation fails. The same error occurs even when using nix, without stack.
The bug can be reproduced very easily.
You can clone from here (https://github.com/ksaric/bronze-linker) and stack build
.
Or you can:
stack new project
cd project
stack build
Now it builds.
- then add gold flags to cabal like here - https://github.com/ksaric/bronze-linker/blob/master/bronze-linker.cabal#L22-L25
stack build
Now it fails.
Linking .stack-work/dist/x86_64-linux-nix/Cabal-1.24.2.0/build/bronze-linker-exe/bronze-linker-exe ...
/nix/store/x9v0yxy5iybp2m2ccqwqkvxgjy7zrw8f-binutils-2.28/bin/ld.gold: --hash-size=31: unknown option
/nix/store/x9v0yxy5iybp2m2ccqwqkvxgjy7zrw8f-binutils-2.28/bin/ld.gold: use the --help option for usage information
collect2: error: ld returned 1 exit status 'cc' failed in phase 'Linker'. (Exit code: 1)
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |