From Alfredo Tupone@21:1/5 to All on Sat Oct 22 23:50:01 2022
I knew that building gcc+ada with an already bootstrapped gcc[ada] is
not supported if you build an older compiler:
like you cannot emerge gcc-10.4.0[ada] using gcc-12.2.0[ada]
I would like to warn the user (and possibly disable ada? ).
I tried this on my local PC
toolchain_pkg_pretend() {
if ! _tc_use_if_iuse cxx ; then
_tc_use_if_iuse go && \
ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"' _tc_use_if_iuse objc++ && \
ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="-cxx"' _tc_use_if_iuse gcj && \
ewarn 'GCJ requires a C++ compiler, disabled due to USE="-cxx"'
fi
+ if _tc_use_if_iuse ada ; then
+ local version=$($(tc-getCC) -dumpversion)
+ if $(ver_test ${version} -gt ${GCC_CONFIG_VER}); then
+ ewarn 'Ada require an older compiler'
+ ewarn "You are building ${GCC_CONFIG_VER} with ${version}"
+ fi
+ fi
want_minispecs
}
I don't know if this code breaks other things, if it works everywhere
...