Skip to content

Commit 4255f1a

Browse files
committed
Pass 'with-gcc:' specified compiler to 'stack setup', fixes #5493
1 parent 37cdf40 commit 4255f1a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Stack/Setup.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,9 +1405,10 @@ installGHCPosix downloadInfo _ archiveFile archiveType tempDir destDir = do
14051405

14061406
dir <- expectSingleUnpackedDir archiveFile tempDir
14071407

1408+
gccEnvMaybe <- fmap (\gcc -> Map.fromList [("CC", T.pack (toFilePath gcc))]) <$> (view $ configL.to configOverrideGccPath)
14081409
logSticky "Configuring GHC ..."
14091410
runStep "configuring" dir
1410-
(gdiConfigureEnv downloadInfo)
1411+
(fromMaybe Map.empty gccEnvMaybe `Map.union` gdiConfigureEnv downloadInfo)
14111412
(toFilePath $ dir </> relFileConfigure)
14121413
(("--prefix=" ++ toFilePath destDir) : map T.unpack (gdiConfigureOpts downloadInfo))
14131414

0 commit comments

Comments
 (0)