diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2022-03-10 20:48:44 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-03-24 17:13:58 -0400 |
commit | 99623358754d812b8b4bdfcdc57190d38617b9cc (patch) | |
tree | 1855477052badd99285e56a8a007a393e1c1062a /hadrian/src | |
parent | 1756d54763d123cb8eabdc8fb95b3ece8c10a6d4 (diff) | |
download | haskell-99623358754d812b8b4bdfcdc57190d38617b9cc.tar.gz |
hadrian: Correct generation of hsc2hs wrapper
If you inspect the inside of a wrapper script for hsc2hs you will see
that the cflag and lflag values are concatenated incorrectly.
```
HSC2HS_EXTRA="--cflag=-U__i686--lflag=-fuse-ld=gold"
```
It should instead be
```
HSC2HS_EXTRA="--cflag=-U__i686 --lflag=-fuse-ld=gold"
```
Fixes #21221
Diffstat (limited to 'hadrian/src')
-rw-r--r-- | hadrian/src/Rules/BinaryDist.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hadrian/src/Rules/BinaryDist.hs b/hadrian/src/Rules/BinaryDist.hs index f07c455e38..e53f686512 100644 --- a/hadrian/src/Rules/BinaryDist.hs +++ b/hadrian/src/Rules/BinaryDist.hs @@ -417,7 +417,7 @@ hsc2hsWrapper = do ldFlags <- map ("--lflag=" <>) <$> settingList (ConfGccLinkerArgs Stage1) wrapper <- drop 4 . lines <$> liftIO (readFile "utils/hsc2hs/hsc2hs.wrapper") return $ unlines - ( "HSC2HS_EXTRA=\"" <> unwords ccArgs <> unwords ldFlags <> "\"" + ( "HSC2HS_EXTRA=\"" <> unwords (ccArgs ++ ldFlags) <> "\"" : "tflag=\"--template=$libdir/template-hsc.h\"" : "Iflag=\"-I$includedir/\"" : wrapper ) |