summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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}