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

    From Alfredo Tupone@21:1/5 to All on Thu Apr 25 17:50:02 2024
    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 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_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
    --
    2
  • From =?utf-8?Q?Arsen_Arsenovi=C4=87?=@21:1/5 to Alfredo Tupone on Fri Apr 26 10:40:01 2024
    Hi,

    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 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ć

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

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

    iIcEARYKAC8WIQT+4rPRE/wAoxYtYGFSwpQwHqLEkwUCZitl9xEcYXJzZW5AZ2Vu dG9vLm9yZwAKCRBSwpQwHqLEkzbpAQCH0XOQdqtDMgOkFU2TfYthrGt9ZI/eFgWr 8Al9ww3HvAEA/Tfja7aEKreIGUXYeNru0UscElSgu9cxOZK6spMANAE=jIg2
    -----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:10:01 2024
    On Fri, 26 Apr 2024 10:29:43 +0200
    Arsen Arsenović <arsen@gentoo.org> 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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam James@21:1/5 to Alfredo Tupone on Tue Apr 30 08:30:01 2024
    Alfredo Tupone <tupone@gentoo.org> writes:

    On Fri, 26 Apr 2024 10:29:43 +0200
    Arsen Arsenović <arsen@gentoo.org> 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.

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

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

    iOUEARYKAI0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCZjCOxl8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MA8cc2FtQGdlbnRv by5vcmcACgkQc4QJ9SDfkZCr0QEA2NWJu+oD52DyhoNBtTg7Czk2UWKT03Ar/wMy lQdo6CYA/Ay3nDFkC6XkSekAPUaK3kQGM+SyVKR4JII+6uRR1IgB
    =Z/QI
    -----END PGP SIGNATURE-----

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