Skip to content

Pass -optcxx for GHC >= 8.10 #7074

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 16, 2020
Merged

Conversation

phadej
Copy link
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