Re: [gentoo-dev] Re: [PATCH 2/3] To build ada we need a c++ compiler too

2024-04-30 Thread Sam James
Alfredo Tupone  writes:

> On Fri, 26 Apr 2024 10:29:43 +0200
> Arsen Arsenović  wrote:
>
>> >  is_ada() {
>> >gcc-lang-supported ada || return 1
>> > -  _tc_use_if_iuse ada
>> > +  _tc_use_if_iuse cxx && _tc_use_if_iuse ada  
>> 
>> Is this redundant?  Would gcc-lang-supported c++ (called through the
>> ada support check) not suffice?
>
> From what I understand this test is checking that both USE=cxx and
> USE=ada are enabled, and both cxx and ada are supported by gcc.
>
> If not, gcc is built without the ada compiler

It's fine with me if you commit these, just please add detail to the
commit messages first. Thanks.


signature.asc
Description: PGP signature


[gentoo-dev] Re: [PATCH 2/3] To build ada we need a c++ compiler too

2024-04-26 Thread Alfredo Tupone
On Fri, 26 Apr 2024 10:29:43 +0200
Arsen Arsenović  wrote:

> >  is_ada() {
> > gcc-lang-supported ada || return 1
> > -   _tc_use_if_iuse ada
> > +   _tc_use_if_iuse cxx && _tc_use_if_iuse ada  
> 
> Is this redundant?  Would gcc-lang-supported c++ (called through the
> ada support check) not suffice?

From what I understand this test is checking that both USE=cxx and
USE=ada are enabled, and both cxx and ada are supported by gcc.

If not, gcc is built without the ada compiler



[gentoo-dev] Re: [PATCH 2/3] To build ada we need a c++ compiler too

2024-04-26 Thread Arsen Arsenović
Hi,

Alfredo Tupone  writes:

> Signed-off-by: Alfredo Tupone 
> ---
>  eclass/toolchain.eclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
> index fd820f60f45d..f8e06fa39884 100644
> --- a/eclass/toolchain.eclass
> +++ b/eclass/toolchain.eclass
> @@ -2495,31 +2495,31 @@ should_we_gcc_config() {
>  #
>  # Also add a hook so special ebuilds (kgcc64) can control which languages
>  # exactly get enabled
>  gcc-lang-supported() {
>   grep ^language=\"${1}\" "${S}"/gcc/*/config-lang.in > /dev/null || 
> return 1
>   [[ -z ${TOOLCHAIN_ALLOWED_LANGS} ]] && return 0
>   has $1 ${TOOLCHAIN_ALLOWED_LANGS}
>  }
>  
>  _tc_use_if_iuse() {
>   in_iuse $1 && use $1
>  }
>  
>  is_ada() {
>   gcc-lang-supported ada || return 1
> - _tc_use_if_iuse ada
> + _tc_use_if_iuse cxx && _tc_use_if_iuse ada

Is this redundant?  Would gcc-lang-supported c++ (called through the ada
support check) not suffice?

>  }
>  
>  is_cxx() {
>   gcc-lang-supported 'c++' || return 1
>   _tc_use_if_iuse cxx
>  }
>  
>  is_d() {
>   gcc-lang-supported d || return 1
>   _tc_use_if_iuse d
>  }
>  
>  is_f77() {
>   gcc-lang-supported f77 || return 1
>   _tc_use_if_iuse fortran

-- 
Arsen Arsenović


signature.asc
Description: PGP signature