commit:     70f21b8bd7fd130067ab5d4798371ae0ef7c6ea6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 18 09:45:34 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 18 09:46:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70f21b8b

toolchain.eclass: wire up modula-2 frontend support for GCC 13; disable Rust 
for 13

- Wire up modula-2 frontend support for GCC 13 as USE=modula2
- Drop Rust for GCC 13, upstream are going to make it fatal for configure
for 13.1, but may revisit for 13.2 (not sure how likely that is, though, it 
depends
on how much ends up backported). Rust will be available for GCC 14 though. We 
will
revisit if changes occur, of course.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/toolchain.eclass    | 9 ++++++++-
 sys-devel/gcc/metadata.xml | 1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 66cf8e88f9b2..ba83cad72cb2 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -280,7 +280,8 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
        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"
-       tc_version_is_at_least 13.0.0_pre20221211 ${PV} && IUSE+=" rust"
+       tc_version_is_at_least 13.0.0_pre20221218 ${PV} && IUSE+=" modula2"
+       tc_version_is_at_least 14.0.0_pre20230423 ${PV} && IUSE+=" rust"
 fi
 
 if tc_version_is_at_least 10; then
@@ -1045,6 +1046,7 @@ toolchain_src_configure() {
        is_f77 && GCC_LANG+=",f77"
        is_f95 && GCC_LANG+=",f95"
        is_ada && GCC_LANG+=",ada"
+       is_modula2 && GCC_LANG+=",m2"
        is_rust && GCC_LANG+=",rust"
 
        confgcc+=( --enable-languages=${GCC_LANG} )
@@ -2744,6 +2746,11 @@ is_objcxx() {
        _tc_use_if_iuse cxx && _tc_use_if_iuse objc++
 }
 
+is_modula2() {
+       gcc-lang-supported m2 || return 1
+       _tc_use_if_iuse cxx && _tc_use_if_iuse modula2
+}
+
 is_rust() {
        gcc-lang-supported rust || return 1
        _tc_use_if_iuse rust

diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index da28d6809a07..a0aff53697da 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -74,6 +74,7 @@
                        other programs with LTO. This USE flag is for whether
                        GCC itself is built and optimized with LTO.
                </flag>
+               <flag name="modula2">Build the GCC Modula-2 language 
frontend.</flag>
                <flag name="mpx">Enable support for Intel Memory Protection 
Extensions (MPX)</flag>
                <flag name="nptl">Enable support for Native POSIX Threads 
Library, the new threading module (requires linux-2.6 or better usually)</flag>
                <flag name="objc">Build support for the Objective C code 
language</flag>

Reply via email to