Cabal tries to use GHC to configure LD
- Dominant language
- Haskell
- Stars
- 1.7k
- Forks
- 750
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 28
Description
**Describe the bug**
Cabal uses a peculiar c program to check if LD supports and should use -x. To do this, it shells out to GHC to compiler the C file. This however requires that GHC will not bail out, yet cabal does not pass --package-db flags to this GHC invocation, and as such we can run into situations where GHC bails out, especially during GHC bootstrap phases where not all boot packages are available.
**To Reproduce**
Steps to reproduce the behavior:
Kill GHC's --package-db (including it's shipped one).
then try to build _anything_.
```
$ cabal build ...
```
**Expected behavior**
cabal doesn't bail out trying to configure ld, but ghc fails during the configuration step.
=> Cabal should use GCC not GHC to test C features.
Contributor guide
Assessment
This issue has not been assessed yet.