tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: c++20: require gcc12?
Thomas Klausner <wiz%NetBSD.org@localhost> writes:
> In mk/compiler/gcc.mk we have:
>
> .if !empty(USE_CXX_FEATURES:Mc++20)
> # gcc documents that 11 is required, with a few perhaps-obscure
> # features requiring 12.
>
> # 10 is the version included in netbsd-10.
> # We hope that it remains OK for most C++20 in the future...
> GCC_REQD+= 10
> .endif
>
>
> finance/bitcoin requires c++20, and in
> http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20250207.2153/bitcoin-28.1/configure.log
> pulls in a gcc10 package, but the configure script is not happy:
>
> checking whether c++ supports C++20 features with -std=c++20... no
> checking whether c++ supports C++20 features with +std=c++20... no
> checking whether c++ supports C++20 features with -h std=c++20... no
> configure: error: *** A compiler with support for C++20 language features is required.
>
> So I think we should bump the requirement to gcc 12.
Absolutely. There was another case recently, whose details escape me.
In this case, the comment doesn't really make sense, or maybe there was
someone who hoped earlier, but now we see it isn't true.
The nature of gcc and c++NN is that there a range of compiler versions
where at the low end it starts to compile some programs using c++NN
features and it takes the high end to reliably build all programs
meeting the standard.
Upstreams tend to document, perhaps implicitly in
configure.ac/CMakeLists, a language standard, and then they expect to be
able to use the standad. We should be able to read configure.ac, set
USE_CXX_FEATURES, and have things work, pretty reliably. The practice
of choosing inadequate versions to avoid building a compiler while
causing failures is harmful.
Home |
Main Index |
Thread Index |
Old Index