I would like to have the attached changes reviewed and, if possible,
applied to the toolchain eclass.
This will simplify the gnat-gpl ebuild and is a step to add ada to
sys-devel/gcc
And also I suggest temporary to mask the ada flag for sys-devel/gcc
Thanks
Alfredo Tupone
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index ee466ee4d904..c18864b60ded 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -172,31 +172,31 @@ if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then
tc_version_is_at_least 4.2 && IUSE+=" +openmp"
tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
tc_version_is_at_least 4.7 && IUSE+=" go"
# sanitizer support appeared in gcc-4.8, but src_compile <
toolchain_src_compile() {
touch "${S}"/gcc/c-gperf.h
# Do not make manpages if we do not have perl ...
[[ ! -x /usr/bin/perl ]] \
&& find "${WORKDIR}"/build -name '*.[17]' -exec touch {} +
+ # Do not set ADAFLAGS to build the compiler
+ unset ADAFLAGS
+
# Older gcc versions did not detect bash and re-exec itself, so force the
# use of bash. Newer ones will auto-detect, but this is not harmful.
# This needs to be set for compile as well, as it's used in libtool
# generation, which will break install otherwise (at least in 3.3.6): #664486
CONFIG_SHELL="${EPREFIX}/bin/bash" \
gcc_do_make ${GCC_MAKE_TARGET}
+ if use ada; then
+ gcc_do_make "-C gcc gnatlib-shared"
+ ln -s gcc ../build/prev-gcc || die
+ ln -s ${CHOST} ../build/prev-${CHOST} || die
+ gcc_do_make "-C gcc gnattools"
+ fi
}
gcc_do_make() {
# This function accepts one optional argument, the make target to be used.
# If omitted, gcc_do_make will try to guess whether it should use all,
# or bootstrap-lean depending on CTARGET and arch.
# An example of how to use this function:
#
# gcc_do_make all-target-libstdc++-v3
[[ -n ${1} ]] && GCC_MAKE_TARGET=${1}
# default target
if is_crosscompile || tc-is-cross-compiler ; then
# 3 stage bootstrapping doesnt quite work when you cant run the