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
sys-devel/make: default CXX to c++ instead of g++ #1982
Conversation
Bug #589894 Package-Manager: portage-2.2.28
While I agree this is in line with how |
I agree with @mgorny Can you help me understand precisely why this is a problem as you say in bug #589894. Does invoking g++ on a musl/clang system fail? |
I think his point is that if we implement the eselect logic to symlink c++ to clang++, make will still default to g++ rather than c++/clang++. |
@zzlei Have bounced this by upstream? GNU make releases move slowly, but if upstream OK's it, we can legitimately backport it. |
@blueness I asked about this upstream and their rationale is: I've checked macOS and FreeBSD; their Make systems both default CXX to c++, and I think there're good reasons to do so on Linux as well. What about a USE flag that enables this feature optionally? @mgorny |
Nah, this is not worth the confusion associated with USE flags. I'd say the change makes sense since CC defaults to cc and not gcc, and we can guarantee c++ will be valid. We could take this as Gentoo customization. @blueness, what do you think? |
I think upstream's reasoning is bad. I'd like to see it be c++. If we make the change then, yes, we as a distro will have to make sure c++ is correct. I'm not sure how to do that if a system has both clang and gcc installed since I haven't played with clang much, but I can't imagine it being difficult. |
I agree. While this is not strictly necessary, I'd say we should ensure that cc/c++ point to the same compiler. Normally both point at gcc but if we start supporting switching that (e.g. using eselect-compiler @zzlei proposed), make should default to matching compilers. |
FWIW, the latest POSIX spec replaces The eselect-compiler module will need to handle this correctly. |
@blueness, ping. Can we merge this? ;-) |
I think Lei's argument makes sense here. Seeing how the standard doesn't define a requirement but recent (and even old) versions of gcc (g++) as well as other c++ compilers provide this I only see a win by doing so. Additionally (as Lei also mentioned), cmake defaults to it; meaning other people have also spent time thinking and validating (disqualifying) its effects. |
Just found this by running in to the same issue a few months later. Anyone thought more about this? |
Now with ~arch revbump! Closes: #1982 Package-Manager: portage-2.2.28 Reviewed-by: Anthony G. Basile <blueness@gentoo.org>
Bug #589894
Package-Manager: portage-2.2.28