File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,9 @@ Bug fixes:
49
49
set [ #53 ] ( https://github.com/commercialhaskell/pantry/pull/53 )
50
50
* Pass any CPP options specified via ` cpp-options: ` in the ` .cabal ` file to GHCi
51
51
using GHC's ` -optP ` flag. See
52
- [ #5608 ] ( https://github.com/commercialhaskell/stack/pull/5608 )
52
+ [ #5608 ] ( https://github.com/commercialhaskell/stack/pull/5608 )
53
+ * On Unix-like operating systems, respect the ` with-gcc ` option when installing
54
+ GHC. See [ #5609 ] ( https://github.com/commercialhaskell/stack/pull/5609 )
53
55
54
56
## v2.7.5
55
57
Original file line number Diff line number Diff line change @@ -1460,10 +1460,21 @@ installGHCPosix downloadInfo _ archiveFile archiveType tempDir destDir = do
1460
1460
1461
1461
dir <- expectSingleUnpackedDir archiveFile tempDir
1462
1462
1463
- gccEnvMaybe <- fmap (\ gcc -> Map. fromList [(" CC" , T. pack (toFilePath gcc))]) <$> (view $ configL. to configOverrideGccPath)
1463
+ mOverrideGccPath <- view $ configL. to configOverrideGccPath
1464
+
1465
+ -- The make application uses the CC environment variable to configure the
1466
+ -- program for compiling C programs
1467
+ let mGccEnv = let gccEnvFromPath p =
1468
+ Map. singleton " CC" $ T. pack (toFilePath p)
1469
+ in gccEnvFromPath <$> mOverrideGccPath
1470
+
1471
+ -- Data.Map.union provides a left-biased union, so mGccEnv will prevail
1472
+ let ghcConfigureEnv =
1473
+ fromMaybe Map. empty mGccEnv `Map.union` gdiConfigureEnv downloadInfo
1474
+
1464
1475
logSticky " Configuring GHC ..."
1465
1476
runStep " configuring" dir
1466
- (fromMaybe Map. empty gccEnvMaybe `Map.union` gdiConfigureEnv downloadInfo)
1477
+ ghcConfigureEnv
1467
1478
(toFilePath $ dir </> relFileConfigure)
1468
1479
((" --prefix=" ++ toFilePath destDir) : map T. unpack (gdiConfigureOpts downloadInfo))
1469
1480
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ extra-source-files:
54
54
doc/README.md
55
55
doc/shell_autocompletion.md
56
56
doc/SIGNING_KEY.md
57
+ doc/Stack_and_VS_Code.md
57
58
doc/stack_yaml_vs_cabal_package_file.md
58
59
doc/travis_ci.md
59
60
doc/yaml_configuration.md
You can’t perform that action at this time.
0 commit comments