Lines 151-157
Link Here
|
151 |
# versions which we dropped. Since graphite was also experimental in |
151 |
# versions which we dropped. Since graphite was also experimental in |
152 |
# the older versions, we don't want to bother supporting it. #448024 |
152 |
# the older versions, we don't want to bother supporting it. #448024 |
153 |
tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) |
153 |
tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) |
154 |
tc_version_is_at_least 4.9 && IUSE+=" cilk +vtv" |
154 |
tc_version_is_at_least 4.9 && IUSE+=" ada cilk +vtv" |
155 |
tc_version_is_at_least 5.0 && IUSE+=" jit mpx" |
155 |
tc_version_is_at_least 5.0 && IUSE+=" jit mpx" |
156 |
tc_version_is_at_least 6.0 && IUSE+=" pie ssp +pch" |
156 |
tc_version_is_at_least 6.0 && IUSE+=" pie ssp +pch" |
157 |
fi |
157 |
fi |
Lines 160-165
Link Here
|
160 |
|
160 |
|
161 |
SLOT="${GCC_CONFIG_VER}" |
161 |
SLOT="${GCC_CONFIG_VER}" |
162 |
|
162 |
|
|
|
163 |
# When using Ada, use this bootstrap compiler to build, only when there is no pre-existing Ada compiler. |
164 |
if in_iuse ada; then |
165 |
# First time build, so need to bootstrap this. |
166 |
# A newer version of GNAT should build an older version, just not vice-versa. 4.9 can definitely build 5.1.0. |
167 |
GNAT_BOOTSTRAP_VERSION="4.9" |
168 |
fi |
169 |
|
163 |
#---->> DEPEND <<---- |
170 |
#---->> DEPEND <<---- |
164 |
|
171 |
|
165 |
RDEPEND="sys-libs/zlib |
172 |
RDEPEND="sys-libs/zlib |
Lines 354-359
Link Here
|
354 |
fi |
361 |
fi |
355 |
fi |
362 |
fi |
356 |
|
363 |
|
|
|
364 |
if in_iuse ada; then |
365 |
GCC_SRC_URI+=" amd64? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz ) |
366 |
x86? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz ) |
367 |
arm? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz )" |
368 |
fi |
369 |
|
357 |
echo "${GCC_SRC_URI}" |
370 |
echo "${GCC_SRC_URI}" |
358 |
} |
371 |
} |
359 |
|
372 |
|
Lines 400-405
Link Here
|
400 |
else |
413 |
else |
401 |
gcc_quick_unpack |
414 |
gcc_quick_unpack |
402 |
fi |
415 |
fi |
|
|
416 |
|
417 |
# Unpack the Ada bootstrap if we're using it. |
418 |
if in_iuse ada && ! type -P gnatbind > /dev/null; then |
419 |
mkdir -p "${WORKDIR}/gnat_bootstrap" || die "Couldn't make GNAT bootstrap directory" |
420 |
pushd "${WORKDIR}/gnat_bootstrap" > /dev/null || die |
421 |
|
422 |
case $(tc-arch) in |
423 |
amd64) |
424 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz || die "Failed to unpack AMD64 GNAT bootstrap compiler" |
425 |
;; |
426 |
x86) |
427 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz || die "Failed to unpack x86 GNAT bootstrap compiler" |
428 |
;; |
429 |
arm) |
430 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz || die "Failed to unpack ARM GNAT bootstrap compiler" |
431 |
;; |
432 |
esac |
433 |
|
434 |
popd > /dev/null || die |
435 |
fi |
403 |
} |
436 |
} |
404 |
|
437 |
|
405 |
gcc_quick_unpack() { |
438 |
gcc_quick_unpack() { |
Lines 820-825
Link Here
|
820 |
fi |
853 |
fi |
821 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
854 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
822 |
|
855 |
|
|
|
856 |
# Add variables we need to make the build find the bootstrap compiler. |
857 |
# We only want to use the bootstrap compiler for stage 1 of bootstrap, this will build the necessary compilers, |
858 |
# then stage 2 uses these compilers. |
859 |
# |
860 |
# We only want to use the bootstrap when we don't have an already installed GNAT compiler. |
861 |
if in_iuse ada && [[ -d ${WORKDIR}/gnat_bootstrap ]] ; then |
862 |
# We need to tell the system about our cross compiler! |
863 |
export GNATBOOT="${WORKDIR}/gnat_bootstrap/usr" |
864 |
export PATH="${GNATBOOT}/bin:${PATH}" |
865 |
|
866 |
confgcc+=( |
867 |
CC=${GNATBOOT}/bin/gnatgcc |
868 |
CXX=${GNATBOOT}/bin/gnatg++ |
869 |
AR=${GNATBOOT}/bin/ar |
870 |
AS=${GNATBOOT}/bin/as |
871 |
LD=${GNATBOOT}/bin/ld |
872 |
NM=${GNATBOOT}/bin/nm |
873 |
RANLIB=${GNATBOOT}/bin/ranlib |
874 |
) |
875 |
fi |
876 |
|
823 |
confgcc+=( |
877 |
confgcc+=( |
824 |
--prefix="${PREFIX}" |
878 |
--prefix="${PREFIX}" |
825 |
--bindir="${BINPATH}" |
879 |
--bindir="${BINPATH}" |
Lines 866-873
Link Here
|
866 |
is_f77 && GCC_LANG+=",f77" |
920 |
is_f77 && GCC_LANG+=",f77" |
867 |
is_f95 && GCC_LANG+=",f95" |
921 |
is_f95 && GCC_LANG+=",f95" |
868 |
|
922 |
|
869 |
# We do NOT want 'ADA support' in here! |
923 |
# We DO want 'Ada support' in here! |
870 |
# is_ada && GCC_LANG+=",ada" |
924 |
is_ada && GCC_LANG+=",ada" |
871 |
|
925 |
|
872 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
926 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
873 |
|
927 |
|
Lines 1689-1695
Link Here
|
1689 |
cd "${D}"${BINPATH} |
1743 |
cd "${D}"${BINPATH} |
1690 |
# Ugh: we really need to auto-detect this list. |
1744 |
# Ugh: we really need to auto-detect this list. |
1691 |
# It's constantly out of date. |
1745 |
# It's constantly out of date. |
1692 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do |
1746 |
if in_iuse ada ; then |
|
|
1747 |
local gnat_extra_bins="gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatlink gnatls gnatmake gnatname gnatprep gnatxref" |
1748 |
fi |
1749 |
|
1750 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do |
1693 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1751 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1694 |
# this should take care of that |
1752 |
# this should take care of that |
1695 |
if [[ -f ${x} ]] ; then |
1753 |
if [[ -f ${x} ]] ; then |