• [gentoo-dev] [PATCH] toolchain.eclass: Register the D tc_feature

    From =?UTF-8?q?Arsen=20Arsenovi=C4=87?=@21:1/5 to All on Thu Feb 9 21:10:01 2023
    This behavior is relied on elsewhere, for setting BDEPENDs correctly.

    Signed-off-by: Arsen Arsenović <[email protected]>
    ---
    Hi there,

    I was trying to merge GDC, and noticed that the non-selfhost BDEPEND is
    missing for GCC 13. Specifically, the following block was never
    enterred:

    # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
    # supports D.
    if tc_has_feature d && tc_version_is_at_least 12.0 ; then
    # D in 12+ is self-hosting and needs D to bootstrap.
    # TODO: package some binary we can use, like for Ada
    # bug #840182
    BDEPEND+=" d? ( || ( sys-devel/gcc[d(-)] <sys-devel/gcc-12[d(-)] ) )"
    fi

    This change enables the correct dependency to be emitted.

    eclass/toolchain.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index 6d8901d21812..06c044fd1d38 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2023 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    #
  • From Sam James@21:1/5 to All on Thu Feb 9 21:20:01 2023
    On 9 Feb 2023, at 20:04, Arsen Arsenović <[email protected]> wrote:

    This behavior is relied on elsewhere, for setting BDEPENDs correctly.

    Signed-off-by: Arsen Arsenović <[email protected]>
    ---
    Hi there,

    I was trying to merge GDC, and noticed that the non-selfhost BDEPEND is missing for GCC 13. Specifically, the following block was never
    enterred:

    # TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler
    # supports D.
    if tc_has_feature d && tc_version_is_at_least 12.0 ; then
    # D in 12+ is self-hosting and needs D to bootstrap.
    # TODO: package some binary we can use, like for Ada
    # bug #840182
    BDEPEND+=" d? ( || ( sys-devel/gcc[d(-)] <sys-devel/gcc-12[d(-)] ) )"
    fi

    This change enables the correct dependency to be emitted.


    Can you add a Fixes: for the original commit where I added the D hack?

    eclass/toolchain.eclass | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index 6d8901d21812..06c044fd1d38 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2022 Gentoo Authors
    +# Copyright 1999-2023 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: toolchain.eclass
    @@ -271,7 +271,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then tc_version_is_at_least 8.0 &&
    IUSE+=" systemtap" TC_FEATURES+=( systemtap )

    - tc_version_is_at_least 9.0 && IUSE+=" d"
    + tc_version_is_at_least 9.0 && IUSE+=" d" TC_FEATURES+=( d )

    Thanks. I thought I'd checked for TC_FEATURES being populated.

    Please push once added Fixes:, cheers!

    Best,
    sam


    -----BEGIN PGP SIGNATURE-----

    iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY+VTi18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kH93AP0Q/ylUFl/06qbrExljmdgVvjsaIXswddFar1XLQ4ta3AEAngC5FXXVaNAi hqYRbz9uFySBOweE27H69ND+r6b+fQQ=
    =HaCV
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)