Skip to content
Snippets Groups Projects
Eric Conlon's avatar
Eric Conlon authored
Fixes https://github.com/haskell/cabal/issues/6421

To summarize, Cabal passes all C and C++ flags through GHC to the underlying C or C++ compiler using -optc. This works for GHC < 8.10, but now GHC expects C++ flags to come through -optcxx. This means that anything through -optc is ignored, so we cannot pass any flags to the C++ compiler. This change simply detects the GHC version and uses the correct arguments.

This PR has been tested manually and two PackageTests have been added to cabal-testsuite. They pass under GHC 8.8.4 and GHC 8.10.2.
28380790
History

Cabal Hackage version Stackage version Build Status Windows build status Documentation Status

This Cabal Git repository contains the following packages:

The canonical upstream repository is located at https://github.com/haskell/cabal.

Installing Cabal (by downloading the binary)

Prebuilt binary releases can be obtained from https://www.haskell.org/cabal/download.html. The cabal-install binary download for your platform should contain the cabal executable.

Installing Cabal (with cabal)

Assuming that you have a pre-existing, older version of cabal-install, run:

cabal install cabal-install

To get the latest version of cabal-install. (You may want to cabal update first.)

To install the latest version from the Git repository, clone the Git repository and then run:

(cd Cabal; cabal install)
(cd cabal-install; cabal install)

Installing Cabal (without cabal)

Assuming you don't have a pre-existing copy of cabal-install, run:

cabal-install $ ./bootstrap.sh # running ./bootstrap.sh from within in cabal-install folder.

For more details, and non-unix like systems, see the README.md in cabal-install and Contributing Guidelines.