summaryrefslogtreecommitdiff
path: root/eclass/toolchain.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-03-12 01:49:51 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-03-12 01:49:51 +0000
commitef0fedb39c21a343a3f316726f272bad9005b22c (patch)
tree0d64e58453e117f61a9e1641532926278f51b72e /eclass/toolchain.eclass
parentcf7807d7aea23a99a144afceaba961cfed652b5f (diff)
gentoo auto-resync : 12:03:2025 - 01:49:51next
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 5cffbd7428ca..2d479c9c7267 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -340,6 +340,7 @@ if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 14.0.0_pre20230423 ${PV} && IUSE+=" rust" TC_FEATURES+=( rust )
tc_version_is_at_least 14.2.1_p20241026 ${PV} && IUSE+=" time64"
tc_version_is_at_least 15.0.0_pre20241124 ${PV} && IUSE+=" libgdiagnostics"
+ tc_version_is_at_least 15.0.1_pre20250316 ${PV} && IUSE+=" cobol"
fi
if tc_version_is_at_least 10; then
@@ -1255,6 +1256,7 @@ toolchain_src_configure() {
is_f77 && GCC_LANG+=",f77"
is_f95 && GCC_LANG+=",f95"
is_ada && GCC_LANG+=",ada"
+ is_cobol && GCC_LANG+=",cobol"
is_modula2 && GCC_LANG+=",m2"
is_rust && GCC_LANG+=",rust"
@@ -1831,6 +1833,11 @@ toolchain_src_configure() {
fi
fi
+ if [[ ${CTARGET} != *-darwin* ]] && tc_version_is_at_least 14.1 ; then
+ # This allows passing -stdlib-=libc++ at runtime.
+ confgcc+=( --with-gxx-libcxx-include-dir="${ESYSROOT}"/usr/include/c++/v1 )
+ fi
+
# TODO: Ignore RCs here (but TOOLCHAIN_IS_RC isn't yet an eclass var)
if [[ ${PV} == *_p* && -f "${S}"/gcc/doc/gcc.info ]] ; then
# Safeguard against https://gcc.gnu.org/PR106899 being fixed
@@ -2600,7 +2607,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 gccrs g++ c++ gcov gdc g77 gfortran gccgo gnat* ; do
+ for x in cpp gcc gccrs g++ c++ gcobol gcov gdc g77 gfortran gccgo gnat* ; do
# For some reason, g77 gets made instead of ${CTARGET}-g77...
# this should take care of that
if [[ -f ${x} ]] ; then
@@ -3142,6 +3149,11 @@ is_objcxx() {
_tc_use_if_iuse cxx && _tc_use_if_iuse objc++
}
+is_cobol() {
+ gcc-lang-supported cobol || return 1
+ _tc_use_if_iuse cobol
+}
+
is_modula2() {
gcc-lang-supported m2 || return 1
_tc_use_if_iuse cxx && _tc_use_if_iuse modula2