-
Notifications
You must be signed in to change notification settings - Fork 709
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 C++ environment variables to configure scripts #10797
Labels
Comments
I have implemented this, but I'm not sure why we set the CFLAGS environment variable but pass CC as an argument. I just copied this rather than change anything. |
mpickering
added a commit
that referenced
this issue
Mar 21, 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
8 tasks
mpickering
added a commit
that referenced
this issue
Mar 21, 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
mpickering
added a commit
that referenced
this issue
Mar 21, 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
mpickering
added a commit
that referenced
this issue
Mar 24, 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
mpickering
added a commit
that referenced
this issue
Mar 24, 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature request
Since Cabal has some support for C++ (
cxx-options
,cxx-sources
), I think we should also support passing standard C++ toolchain environment variables to the configure script analogously to how we do with C:cabal/Cabal/src/Distribution/Simple/ConfigureScript.hs
Lines 171 to 177 in 595d023
I think this would be
CXX
(likeCC
)CXXFLAGS
(likeCFLAGS
)Additional context
This came up in https://gitlab.haskell.org/ghc/ghc/-/issues/25767#note_610831
The text was updated successfully, but these errors were encountered: