tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: C++20 and gcc12/10
* On 2025-04-06 at 01:50 BST, David Holland wrote:
On Fri, Apr 04, 2025 at 08:06:16AM +0100, Jonathan Perkin wrote:
> > Is it reasonable to commit
> >
> > -USE_CXX_FEATURES= c++20
> > +# gcc10's C++20 support seems to be adequate and since an explicit
> > +# requirement of C++20 requires building gcc12 on 10.x and elsewhere,
> > +# hold off on the stricter constraint for now.
> > +#USE_CXX_FEATURES= c++20
> > +GCC_REQD+= 10
> >
> > in packages where it works? It's easy enough to put back the stronger
> > constraint if the build stops working.
>
> No, this belongs in infrastructure. A package should only have to declare
> what it needs in terms of compiler support, not have OS-specific hacks
> spread across them. Since adding support for *_FEATURES there shouldn't be
> any GCC_REQD in packages.
Ahem. There's nothing OS-specific about "it works with gcc10".
Well, you know what I mean. The only reason this is being proposed is
to work around an OS-specific issue, i.e. NetBSD's latest release
shipping gcc10 and an aversion to using a more modern pkgsrc GCC. If
NetBSD 10 had shipped GCC 12 or newer then we probably wouldn't be
having this discussion.
My point is that the way this works should be:
* Package simply declares "I need feature foo".
* Infrastructure determines whether foo is available natively, and if
not builds pkgsrc version to satisfy it.
* Any complicated logic to override this and have builtin satisfy foo
for whatever reason belongs in mk/platform.
and that putting mk/platform stuff in packages, like is effectively
being proposed here, is the wrong approach.
> [snip irrelevant]
>
> Also, if only specific parts of c++20 are required and they would be
> satisfied by GCC 10.x then they should be newly added to USE_CXX_FEATURES
> and handled appropriately.
ok then, so what should the FEATURE be called? c++20-gcc10? c++20-lite?
I mean like we already have for unique_ptr, regex, etc. Whatever the
part of c++20 is that the package needs that is supported by the GCC
in NetBSD 10.
--
Jonathan Perkin pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index