tech-pkg archive

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

Broken USE_PKGSRC_GCC handling



mk/compiler/gcc.mk has recently introduced some hacks that enable USE_PKGSRC_GCC* on certain older NetBSD platforms.

Unfortunately it has been cargo culted into GCC 12 and GCC 13 support, so that now non-NetBSD platforms are broken if a package sets them in GCC_REQD. For example, this is the correct handling in some random package that has e.g. GCC_REQD+=7 when I am using a native GCC 13:

  $ bmake show-vars VARNAMES="_GCCBINDIR CC_VERSION USE_PKGSRC_GCC"
  /opt/tools/gcc13/bin
  gcc-13.2.0
  no
and this is broken handling in lang/libcxx which now sets GCC_REQD+=12:

  $ bmake show-vars VARNAMES="_GCCBINDIR CC_VERSION USE_PKGSRC_GCC"
  /opt/pkg/_GCC_SUBPREFIX_not_found/bin
  gcc-12
  yes

As a result lang/gcc12 is now causing large breakage in my SunOS builds even though it should never be used for that build:

  https://mail-index.netbsd.org/pkgsrc-bulk/2023/10/08/msg024408.html

Please fix. I can't do this myself as I don't know what logic should be used for the NetBSD versions that require pkgsrc GCC.

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.

Thanks,

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


Home | Main Index | Thread Index | Old Index