tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Broken USE_PKGSRC_GCC handling



* On 2023-10-10 at 09:13 BST, nia wrote:

On Mon, Oct 09, 2023 at 03:36:53PM +0100, Jonathan Perkin wrote:
* On 2023-10-09 at 14:07 BST, Greg Troxel wrote:

> Jonathan Perkin <jperkin%mnx.io@localhost> writes:
>
> > And I would strongly recommend architecting this correctly so the
> > logic is kept in mk/platform/NetBSD.mk.  mk/compiler is already far
> > too complex, and that makes it very easy to introduce bugs like this.
>
> A fair point that things are broken and should be fixed, but I don't see
> why this is specific to NetBSD.

Yes, there are some other small OPSYS sections that could also be
abstracted, but they are generally self-contained and commented while the
NetBSD bits are a lot more invasive, uncommented, and right in the middle of
complex logic which is likely a leading factor as to how this bug was
introduced.

The changes cargo-culted a block that contained a very obvious check for both
NetBSD and OPSYS_VERSION, and deleted both, which I think is incorrect in any
circumstances. People need to be better about WorksForMe(tm) style commits  :/

The ideal fix would be to check the compiler version rather than the OS
version, but I don't have the capacity to work on this task at the moment.

Thanks for fixing this in the short-term.  Yeh that sounds good.

I would also like to extract all of the GCC_REQD logic from gcc.mk into a separate file and include it unless USE_NATIVE_GCC=yes or USE_PKGSRC_GCC=no. That would reduce the chances of similar issues in the future, simplify things a lot, and also mean those using native compilers do not suffer with the GCC_REQD performance problems.

That will obviously need a lot of testing, so I'll hopefully have a branch up for folks to try out soon.

--
Jonathan Perkin   -   mnx.io   -   pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com


Home | Main Index | Thread Index | Old Index