Lines 152-158
Link Here
|
152 |
# versions which we dropped. Since graphite was also experimental in |
152 |
# versions which we dropped. Since graphite was also experimental in |
153 |
# the older versions, we don't want to bother supporting it. #448024 |
153 |
# the older versions, we don't want to bother supporting it. #448024 |
154 |
tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) |
154 |
tc_version_is_at_least 4.8 && IUSE+=" graphite" IUSE_DEF+=( sanitize ) |
155 |
tc_version_is_at_least 4.9 && IUSE+=" cilk +vtv" |
155 |
tc_version_is_at_least 4.9 && IUSE+=" ada cilk +vtv" |
156 |
tc_version_is_at_least 5.0 && IUSE+=" jit mpx" |
156 |
tc_version_is_at_least 5.0 && IUSE+=" jit mpx" |
157 |
tc_version_is_at_least 6.0 && IUSE+=" pie +ssp" |
157 |
tc_version_is_at_least 6.0 && IUSE+=" pie +ssp" |
158 |
fi |
158 |
fi |
Lines 161-166
Link Here
|
161 |
|
161 |
|
162 |
SLOT="${GCC_CONFIG_VER}" |
162 |
SLOT="${GCC_CONFIG_VER}" |
163 |
|
163 |
|
|
|
164 |
# When using Ada, use this bootstrap compiler to build, only when there is no pre-existing Ada compiler. |
165 |
if in_iuse ada; then |
166 |
# First time build, so need to bootstrap this. |
167 |
# A newer version of GNAT should build an older version, just not vice-versa. 4.9 can definitely build 5.1.0. |
168 |
GNAT_BOOTSTRAP_VERSION="4.9" |
169 |
fi |
170 |
|
164 |
#---->> DEPEND <<---- |
171 |
#---->> DEPEND <<---- |
165 |
|
172 |
|
166 |
RDEPEND="sys-libs/zlib |
173 |
RDEPEND="sys-libs/zlib |
Lines 355-360
Link Here
|
355 |
fi |
362 |
fi |
356 |
fi |
363 |
fi |
357 |
|
364 |
|
|
|
365 |
if in_iuse ada; then |
366 |
GCC_SRC_URI+=" amd64? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz ) |
367 |
x86? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz ) |
368 |
arm? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz )" |
369 |
fi |
370 |
|
358 |
echo "${GCC_SRC_URI}" |
371 |
echo "${GCC_SRC_URI}" |
359 |
} |
372 |
} |
360 |
|
373 |
|
Lines 401-406
Link Here
|
401 |
else |
414 |
else |
402 |
gcc_quick_unpack |
415 |
gcc_quick_unpack |
403 |
fi |
416 |
fi |
|
|
417 |
|
418 |
# Unpack the Ada bootstrap if we're using it. |
419 |
if in_iuse ada && ! type -P gnatbind > /dev/null; then |
420 |
mkdir -p "${WORKDIR}/gnat_bootstrap" || die "Couldn't make GNAT bootstrap directory" |
421 |
pushd "${WORKDIR}/gnat_bootstrap" > /dev/null || die |
422 |
|
423 |
case $(tc-arch) in |
424 |
amd64) |
425 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz || die "Failed to unpack AMD64 GNAT bootstrap compiler" |
426 |
;; |
427 |
x86) |
428 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz || die "Failed to unpack x86 GNAT bootstrap compiler" |
429 |
;; |
430 |
arm) |
431 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz || die "Failed to unpack ARM GNAT bootstrap compiler" |
432 |
;; |
433 |
esac |
434 |
|
435 |
popd > /dev/null || die |
436 |
fi |
404 |
} |
437 |
} |
405 |
|
438 |
|
406 |
gcc_quick_unpack() { |
439 |
gcc_quick_unpack() { |
Lines 805-810
Link Here
|
805 |
fi |
838 |
fi |
806 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
839 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
807 |
|
840 |
|
|
|
841 |
# Add variables we need to make the build find the bootstrap compiler. |
842 |
# We only want to use the bootstrap compiler for stage 1 of bootstrap, this will build the necessary compilers, |
843 |
# then stage 2 uses these compilers. |
844 |
# |
845 |
# We only want to use the bootstrap when we don't have an already installed GNAT compiler. |
846 |
if in_iuse ada && [[ -d ${WORKDIR}/gnat_bootstrap ]] ; then |
847 |
# We need to tell the system about our cross compiler! |
848 |
export GNATBOOT="${WORKDIR}/gnat_bootstrap/usr" |
849 |
export PATH="${GNATBOOT}/bin:${PATH}" |
850 |
|
851 |
EXTRA_ECONF+=( |
852 |
CC=${GNATBOOT}/bin/gnatgcc |
853 |
CXX=${GNATBOOT}/bin/gnatg++ |
854 |
AR=${GNATBOOT}/bin/ar |
855 |
AS=${GNATBOOT}/bin/as |
856 |
LD=${GNATBOOT}/bin/ld |
857 |
NM=${GNATBOOT}/bin/nm |
858 |
RANLIB=${GNATBOOT}/bin/ranlib |
859 |
) |
860 |
|
861 |
einfo "EXTRA_ECONF=\"${EXTRA_ECONF}\"" |
862 |
fi |
863 |
|
808 |
confgcc+=( |
864 |
confgcc+=( |
809 |
--prefix="${PREFIX}" |
865 |
--prefix="${PREFIX}" |
810 |
--bindir="${BINPATH}" |
866 |
--bindir="${BINPATH}" |
Lines 851-858
Link Here
|
851 |
is_f77 && GCC_LANG+=",f77" |
907 |
is_f77 && GCC_LANG+=",f77" |
852 |
is_f95 && GCC_LANG+=",f95" |
908 |
is_f95 && GCC_LANG+=",f95" |
853 |
|
909 |
|
854 |
# We do NOT want 'ADA support' in here! |
910 |
# We DO want 'Ada support' in here! |
855 |
# is_ada && GCC_LANG+=",ada" |
911 |
is_ada && GCC_LANG+=",ada" |
856 |
|
912 |
|
857 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
913 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
858 |
|
914 |
|
Lines 1669-1675
Link Here
|
1669 |
cd "${D}"${BINPATH} |
1725 |
cd "${D}"${BINPATH} |
1670 |
# Ugh: we really need to auto-detect this list. |
1726 |
# Ugh: we really need to auto-detect this list. |
1671 |
# It's constantly out of date. |
1727 |
# It's constantly out of date. |
1672 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do |
1728 |
|
|
|
1729 |
if in_iuse ada ; then |
1730 |
local gnat_extra_bins="gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatlink gnatls gnatmake gnatname gnatprep gnatxref" |
1731 |
fi |
1732 |
|
1733 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do |
1673 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1734 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1674 |
# this should take care of that |
1735 |
# this should take care of that |
1675 |
if [[ -f ${x} ]] ; then |
1736 |
if [[ -f ${x} ]] ; then |