Mailing List Archive

[PATCH 1/3] To make "tc_has_feature ada" actually work
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 )
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"
--
2.43.2
Re: [PATCH 1/3] To make "tc_has_feature ada" actually work [ In reply to ]
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?
Re: [PATCH 1/3] To make "tc_has_feature ada" actually work [ In reply to ]
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
Re: [PATCH 1/3] To make "tc_has_feature ada" actually work [ In reply to ]
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?