Summary: | dev-lang/ghc-8.0.2: fails to compile with lld: ld.lld: error: unknown argument '-no-relax' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo's Haskell Language team <haskell> |
Status: | CONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 731004, 734886 | ||
Attachments: |
build.log.bz2
other.tar.bz2 |
Description
Agostino Sarubbo
2020-07-15 07:06:21 UTC
Created attachment 649254 [details]
build.log.bz2
build log and emerge --info
Created attachment 649256 [details]
other.tar.bz2
other logs
<no location info>: error: Warning: Couldn't figure out linker information! Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc. ld.lld: error: unknown argument '-no-relax' collect2: error: ld returned 1 exit status `x86_64-pc-linux-gnu-gcc' failed in phase `Linker'. (Exit code: 1) make[1]: *** [libraries/ghc-prim/ghc.mk:4: libraries/ghc-prim/dist-install/build/GHC/Types.o] Error 1 It's caused by /ghc-8.0.2-no-relax-everywhere.patch patch that fails to detect that linker is not a GNU linker: index acd0d61..5830517 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -2172,5 +2172,3 @@ joinObjectFiles dflags o_files output_fn = do -- disable --relax explicitly. - ++ (if platformArch (targetPlatform dflags) - `elem` [ArchSPARC, ArchSPARC64] - && ldIsGnuLd + ++ (if ldIsGnuLd then [SysTools.Option "-Wl,-no-relax"] Probably because driver is called via -fuse-ld=lld. Or probably because bootstrap ghc was built using GNU linker. https://gitlab.haskell.org/ghc/ghc/-/commit/53ce0db5a06598c88c6b8cb32043b878e7083dd4 removed -no-relax option. *** Bug 734886 has been marked as a duplicate of this bug. *** *** Bug 736104 has been marked as a duplicate of this bug. *** *** Bug 736100 has been marked as a duplicate of this bug. *** *** Bug 736018 has been marked as a duplicate of this bug. *** *** Bug 736016 has been marked as a duplicate of this bug. *** *** Bug 736010 has been marked as a duplicate of this bug. *** *** Bug 736004 has been marked as a duplicate of this bug. *** *** Bug 736002 has been marked as a duplicate of this bug. *** *** Bug 735988 has been marked as a duplicate of this bug. *** |