Skip to content

Pass -optcxx for GHC >= 8.10#7074

Merged
phadej merged 1 commit intohaskell:3.4from
phadej:backport-to-3.4-on-20200916
Sep 16, 2020
Merged

Pass -optcxx for GHC >= 8.10#7074
phadej merged 1 commit intohaskell:3.4from
phadej:backport-to-3.4-on-20200916

Conversation

@phadej
Copy link
Copy Markdown
Collaborator

@phadej phadej commented Sep 16, 2020

Fixes haskell#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.
@phadej phadej added this to the 3.4.0.0 milestone Sep 16, 2020
@phadej phadej merged commit 3baaaa0 into haskell:3.4 Sep 16, 2020
@phadej phadej deleted the backport-to-3.4-on-20200916 branch September 16, 2020 15:12
@phadej phadej mentioned this pull request Sep 24, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants