pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: devel/abseil asks for gcc-12 ((Re: NetBSD/9.4
Makoto mef Fujiwara <makoto%if.t.u-tokyo.ac.jp@localhost> writes:
> Hi, thanks for checking,
> Honestly speaking, I've not thought about the logic.
>
> -USE_CXX_FEATURES= c++17
> +USE_CXX_FEATURES= c++20
> FORCE_CXX_STD= c++17
>
> This results picking up gcc12, and it is now packaged on 9.4, too.
That's the wrong way to do it.
> (FORCE may not force the standard, but just asking minimum level ?)
FORCE_CXX_STD=c++17 causes the wrappers to add --std=c++17 to the build,
to work around buggy upstreams.
Overall, this is wrong, even if it makes the package build. It's also
seriously lacking in explanation and upstream bug reports.
Upstream should in README define what std is needed.
pkgsrc Makefile should set USE_CXX_FEATURES for the documented standard
Upstream's configure should test for --std=foo for their documented
standard and error out if that fails.
Upstream's build should add --std=foo for the standard after testing.
If we find that upstream does not set --std, then FORCE_CXX_STD= is
the workaround. This should be accompanied by a comment expainined
the problem, and a URL to the upstream bug report.
If despite all of this, it fails to build, then there should be an
upstream bug report (because it fails to build with a compiler
documented to support the version documented by upstream!), a compiler
bug report (because it fails to build a valid program), or some other
report depending on which software is at fault. And then GCC_REQD to
a value that works, with a comment explaining the whole story. The
value that works should follow the limited versions guidance in
comiler/gcc.mk, to avoid building lots of extra versions.
Home |
Main Index |
Thread Index |
Old Index