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.