summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-12-13 20:07:22 +0000
committerSam James <sam@gentoo.org>2022-12-13 20:07:45 +0000
commite4ac21a504361122fa288a0f9f2126384934198e (patch)
treef837e70cb5b259506b7356883bb985d71e6a33c6 /eclass/toolchain.eclass
parentmedia-plugins/gst-plugins-ximagesrc: Stabilize 1.20.4 x86, #884731 (diff)
downloadgentoo-e4ac21a504361122fa288a0f9f2126384934198e.tar.gz
gentoo-e4ac21a504361122fa288a0f9f2126384934198e.tar.bz2
gentoo-e4ac21a504361122fa288a0f9f2126384934198e.zip
toolchain.eclass: add USE=rust for GCC 13.0.9999
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ea223984de2e..021db270828c 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -280,6 +280,7 @@ 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"
fi
if tc_version_is_at_least 10; then
@@ -1020,8 +1021,8 @@ toolchain_src_configure() {
is_fortran && GCC_LANG+=",fortran"
is_f77 && GCC_LANG+=",f77"
is_f95 && GCC_LANG+=",f95"
-
is_ada && GCC_LANG+=",ada"
+ is_rust && GCC_LANG+=",rust"
confgcc+=( --enable-languages=${GCC_LANG} )
@@ -2108,7 +2109,7 @@ toolchain_src_install() {
cd "${D}"${BINPATH} || die
# Ugh: we really need to auto-detect this list.
# It's constantly out of date.
- for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo gnat* ; do
+ for x in cpp gcc gccrs g++ c++ gcov g77 gcj gcjh gfortran gccgo gnat* ; do
# For some reason, g77 gets made instead of ${CTARGET}-g77...
# this should take care of that
if [[ -f ${x} ]] ; then
@@ -2689,6 +2690,11 @@ is_objcxx() {
_tc_use_if_iuse cxx && _tc_use_if_iuse objc++
}
+is_rust() {
+ gcc-lang-supported rust || return 1
+ _tc_use_if_iuse rust
+}
+
# Grab a variable from the build system (taken from linux-info.eclass)
get_make_var() {
local var=$1 makefile=${2:-${WORKDIR}/build/Makefile}