Skip to content

Commit

Permalink
Fix configuation of ldProgram
Browse files Browse the repository at this point in the history
Standard GNU `ld` ues `--relocatable` while `ld.gold` uses a `-relocatable`
flag (with a single `-`). Code will now detect both versions.
  • Loading branch information
erikd committed Oct 3, 2023
1 parent 2f26420 commit 6b54501
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Cabal/src/Distribution/Simple/Program/Builtin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ ldProgram =
-- `lld` only accepts `-help`.
`catchIO` (\_ -> return "")
let k = "Supports relocatable output"
v = if "--relocatable" `isInfixOf` ldHelpOutput then "YES" else "NO"
-- Standard GNU `ld` ues `--relocatable` while `ld.gold` uses
-- `-relocatable` (single `-`).
v = if "-relocatable" `isInfixOf` ldHelpOutput then "YES" else "NO"
m = Map.insert k v (programProperties ldProg)
return $ ldProg{programProperties = m}
}
Expand Down

0 comments on commit 6b54501

Please sign in to comment.