tech-pkg archive

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

Re: Overhauling gcc.mk



On Tue, 17 Oct 2023 at 15:45:57 -0700, Jonathan Perkin wrote:
>As promised, I've been completely renovating mk/compiler/gcc.mk to
>hopefully reduce a lot of the complexity, make it less likely that
>future changes will result in accidental breakage, add numerous
>comments, as well as improving performance.
>
>
>The branch is here:
>
> 
https://github.com/NetBSD/pkgsrc/compare/trunk...TritonDataCenter:pkgsrc:feature/gcc-selection/trunk
>
>Overview:
>
>  * Move GCC_REQD and associated logic into a separate file.
>
>  * If the user has requested USE_NATIVE_GCC=yes then skip all of the
>    GCC_REQD processing.
>
>  * Add support for GCC_BOOTSTRAP_PKGS, a list of PKGPATH packages that
>    are in the dependency path for gcc and gcc-libs, making it easier
>    for users to avoid circular dependencies when USE_PKGSRC_GCC=yes.
>
>  * Make it easier for users to select their own GCC packages, e.g.
>    from wip or other repositories.
>
>  * Remove _USE_GCC_SHLIB and USE_GCC_RUNTIME, and simply enable based
>    on USE_PKGSRC_GCC_RUNTIME, with the same exclusions as above.
>    Removing USE_GCC_RUNTIME from individual packages can be done
later.
>
>  * Remove ALLOW_NEWER_COMPILER, it essentially duplicates the
>    USE_NATIVE_GCC logic and confuses things.
>
>  * Remove bogus _LANGUAGES setup, assume GCC packages support all
>    languages, and simplify.
>
>  * Simplify GCC version detection, reducing number of forks, and
remove
>    support for long-obsolete compilers.
>
>  * Simplify NetBSD USE_PKGSRC_GCC_RUNTIME selection.
>
>  * Rename a bunch of variables to make it clearer what they actually
>    do.
>
>  * Use newer make syntax.
>
>  * Stop trying to support NetBSD < 1.5.
>
>This will obviously require lots of testing before it even goes near
>the tree, but I would appreciate feedback on any of the more
>contentious parts, and obviously testing would be fantastic too.

I've begun testing this on 9.3_STABLE/amd64, though I haven't got very
far yet. No issues noted so far, it behaves as the previous version
did (e.g., with openblas and firefox).

I did wonder if ultimately we want to move other OS-specific fragments
into their platform file, too, e.g.:
https://github.com/TritonDataCenter/pkgsrc/blob/5a6b106903f2a7925062130280a705dde2b8ee94/mk/compiler/gcc-reqd.mk#L276

Thanks,

Dave



Home | Main Index | Thread Index | Old Index