• Re: [gentoo-dev] [PATCH 1/3] To make "tc_has_feature ada" actually work

    From =?utf-8?Q?Arsen_Arsenovi=C4=87?=@21:1/5 to Alfredo Tupone on Fri Apr 26 10:40:02 2024
    looks OK at a glance, but could you summarize the issues the patch set
    fixes in the commit messages (and reword them to follow convention
    generally)? it is important to have context while looking at a git log.

    Alfredo Tupone <tupone@gentoo.org> writes:

    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
    ---
    eclass/toolchain.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
    index a5d4345e7fbf..fd820f60f45d 100644
    --- a/eclass/toolchain.eclass
    +++ b/eclass/toolchain.eclass
    @@ -288,31 +288,31 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
    IUSE+=" objc-gc" TC_FEATURES+=( objc-gc )
    IUSE+=" libssp objc++"

    # Stop forcing openmp on by default in the eclass. Gradually phase it out.
    # See bug #890999.
    if tc_version_is_at_least 13.0.0_pre20221218 ; then
    IUSE+=" openmp"
    else
    IUSE+=" +openmp"
    fi

    IUSE+=" fixed-point"
    IUSE+=" go"
    IUSE+=" +sanitize" TC_FEATURES+=( sanitize )
    IUSE+=" graphite" TC_FEATURES+=( graphite )
    - IUSE+=" ada"
    + IUSE+=" ada" TC_FEATURES+=( ada )

    does this apply for all versions of GCC?

    IUSE+=" vtv"
    IUSE+=" jit"
    IUSE+=" +pie +ssp pch"

    IUSE+=" systemtap" TC_FEATURES+=( systemtap )

    tc_version_is_at_least 9.0 && IUSE+=" d" TC_FEATURES+=( d )
    tc_version_is_at_least 9.1 && IUSE+=" lto"
    tc_version_is_at_least 10 && IUSE+=" cet"
    tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=( zstd )
    tc_version_is_at_least 11 && IUSE+=" valgrind" TC_FEATURES+=( valgrind )
    tc_version_is_at_least 11 && IUSE+=" custom-cflags"
    tc_version_is_at_least 12 && IUSE+=" ieee-long-double"
    tc_version_is_at_least 12.2.1_p20221203 ${PV} && IUSE+=" default-znow"
    tc_version_is_at_least 12.2.1_p20221203 ${PV} && IUSE+=" default-stack-clash-protection"

    --
    Arsen Arsenović

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

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

    iIcEARYKAC8WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZitnJBEcYXJzZW5AZ2Vu dG9vLm9yZwAKCRBSwpQwHqLEk0kBAQDWvfdjKiQv4B3W4BBKhUpjMx6V8p+Sp3gp 62smyPGKpgD+ISDJM/TT9RJ+hnynk+9BLU5jcLWH8e7mIhBhyp1taw0=yC4z
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Alfredo Tupone@21:1/5 to arsen@gentoo.org on Fri Apr 26 20:00:01 2024
    On Fri, 26 Apr 2024 10:34:44 +0200
    Arsen Arsenović <arsen@gentoo.org> wrote:

    looks OK at a glance, but could you summarize the issues the patch set
    fixes in the commit messages (and reword them to follow convention generally)? it is important to have context while looking at a git
    log.

    - IUSE+=" ada"
    + IUSE+=" ada" TC_FEATURES+=( ada )

    The change is about adding TC_FEATURES+=( ada )

    Some lines towards the end there is


    # TODO: Add a pkg_setup & pkg_pretend check for whether the active
    compiler # supports Ada.
    if tc_has_feature ada ; then
    BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] )
    )"
    fi


    it looks to me that if TC_FEATURES+=( ada ) is missing, that dependency
    is not added


    does this apply for all versions of GCC?

    I really don't know. Ada source are provided with gcc-8 too (the oldest
    version in the tree). I personally built gcc-10..13

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?utf-8?Q?Arsen_Arsenovi=C4=87?=@21:1/5 to Alfredo Tupone on Tue Apr 30 11:00:01 2024
    Alfredo Tupone <tupone@gentoo.org> writes:

    On Fri, 26 Apr 2024 10:34:44 +0200
    Arsen Arsenović <arsen@gentoo.org> wrote:

    looks OK at a glance, but could you summarize the issues the patch set
    fixes in the commit messages (and reword them to follow convention
    generally)? it is important to have context while looking at a git
    log.

    - IUSE+=" ada"
    + IUSE+=" ada" TC_FEATURES+=( ada )

    The change is about adding TC_FEATURES+=( ada )

    Some lines towards the end there is


    # TODO: Add a pkg_setup & pkg_pretend check for whether the active
    compiler # supports Ada.
    if tc_has_feature ada ; then
    BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] )
    )"
    fi


    it looks to me that if TC_FEATURES+=( ada ) is missing, that dependency
    is not added

    Indeed, but it would be nice to be able to tell that from the git log.


    does this apply for all versions of GCC?

    I really don't know. Ada source are provided with gcc-8 too (the oldest version in the tree). I personally built gcc-10..13

    That's good enough for our case I think (given we only have 8+ at all,
    and only 11+ are unmasked).

    Overall, probably OK.
    --
    Arsen Arsenović

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

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

    iOcEARYKAI8WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZjCxH18UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0RkVF MkIzRDExM0ZDMDBBMzE2MkQ2MDYxNTJDMjk0MzAxRUEyQzQ5MxEcYXJzZW5AZ2Vu dG9vLm9yZwAKCRBSwpQwHqLEk/aJAQDnWrJULKXY7TzW/nwF08PKQGf1QTJwkstD mxdmGxlzLwEA0uFFiTYkRxC5pJSui71S0M8tagSCHHjSgYFuaELFSQE=PuiV
    -----END PGP SIGNATURE-----

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