Skip to content
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

Pass CXX and CXXFLAGS argument to ./configure scripts for build-type: Configure #10844

Merged
merged 1 commit into from
Apr 13, 2025

Conversation

mpickering
Copy link
Collaborator

Since the compiler since ghc-9.4.8 requires a C++ toolchain, and that is configured into the compiler --info, it makes sense to pass that information onto the ./configure script.

The assumption that the C++ compiler is part of the toolchain is only since ghc-9.4. Therefore, if no C++ compiler is found, then the options won't be passed to the configure script.

For compilers older than 9.4, the C++ compiler will always be found as it is configured into the settings file.

See https://gitlab.haskell.org/ghc/ghc/-/issues/25767#note_610831 for some discussion about how this would be useful to implement system-cxx-std-lib in userspace.

Fixes #10797

Please read Github PR Conventions and then fill in one of these two templates.


Template Α: This PR modifies behaviour or interface

Include the following checklist in your PR:


Template B: This PR does not modify behaviour or interface

E.g. the PR only touches documentation or tests, does refactorings, etc.

Include the following checklist in your PR:

  • Patches conform to the coding conventions.
  • Is this a PR that fixes CI? If so, it will need to be backported to older cabal release branches (ask maintainers for directions).

@Ericson2314
Copy link
Collaborator

Seems basically good. I might try to make more gpp g++ or gxx, but I suppose I doesn't matter to much.

I don't really get why Cabal is asking GHC what toolchains to use, but I suppose that is just inheriting the current behavior, so better to be consistent.

@mpickering
Copy link
Collaborator Author

Any reviewers? @Ericson2314 could you approve please?

@mpickering mpickering added the merge me Tell Mergify Bot to merge label Apr 11, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Apr 11, 2025
… Configure

Since the compiler since ghc-9.4.8 requires a C++ toolchain, and that is
configured into the compiler --info, it makes sense to pass that
information onto the ./configure script.

The assumption that the C++ compiler is part of the toolchain is only
since ghc-9.4. Therefore, if no C++ compiler is found, then the options
won't be passed to the configure script.

For compilers older than 9.4, the C++ compiler will always be found as
it is configured into the settings file.

See https://gitlab.haskell.org/ghc/ghc/-/issues/25767#note_610831 for
some discussion about how this would be useful to implement
system-cxx-std-lib in userspace.

Fixes #10797
@mergify mergify bot merged commit 6463c28 into master Apr 13, 2025
56 checks passed
@mergify mergify bot deleted the wip/10797 branch April 13, 2025 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attention: needs-review merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pass C++ environment variables to configure scripts
3 participants