Jonathan Perkin <jperkin%joyent.com@localhost> writes: > If done correctly then I'd be in favour, i.e. it needs to not break > the existing use case where a user can set USE_PKGSRC_GCC and GCC_REQD > and have a specific version used unless a package sets GCC_REQD to a > higher version. I'm sympathetic to your use case but it seems there is in our current scheme semantic confusion between what a package needs and what a (pkgsrc admin) wants. There seems to be a notion built into GCC_REQD that any newer version of gcc will be ok also. That might often be true, but seems unlikely to always be true. This issue doesn't seem to come up with clang. That may be because there aren't really crufty clang versions in base systems (yet?). So, I'd like to see a more complete rototill, which might be easier than incremental fixes. This is fuzzy and meant to be a basis for discussion, not an actual proposal, and I would well be missing something. * variables set by packages ** GCC_REQD the minimum gcc version needed, with the semantics that all higher versions are ok. Does not imply anything at all about clang. ** GCC_INCOMPATIBLE gcc versions > $GCC_REQD that are known not to work for this package ** CLANG_REQD/CLANG_INCOMPATIBLE (to be added if we really need it, omitted for now) * variables set in mk.conf ** PKGSRC_GCC_DESIRED (perhaps only if USE_PKGSRC_GCC) The version of gcc that should be used, assuming a package is ok with it. This defaults to the base system's gcc version, or to some version in pkgsrc (highish). Perhaps this really looks like base:41 or pkgsrc:49 and USE_PKGSRC_GCC goes away. ** PKGSRC_GCC_HIGH The version of gcc that should be used if the base one isn't ok. If this version isn't ok. * build rules for a package If PKGSRC_GCC_DESIRED satisfies GCC_REQD/GCC_INCOMPATIBLE, use it. Otherwise, if PKGSRC_GCC_HIGH satisfies, use it. Otherwise, search the list of gcc versions from high to low and use the first one that satisfies the rule. (If that's not ok, maybe PKGSRC_GCC_DESIRED should be a list, but that feels too complicated.)
Attachment:
pgpRPLbjEDDxC.pgp
Description: PGP signature