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 |
tc_version_is_at_least 4.9 && GNAT_BOOTSTRAP_VERSION="4.9" |
168 |
tc_version_is_at_least 5.0 && GNAT_BOOTSTRAP_VERSION="5.4" |
169 |
tc_version_is_at_least 6.0 && GNAT_BOOTSTRAP_VERSION="6.3" |
170 |
fi |
171 |
|
163 |
#---->> DEPEND <<---- |
172 |
#---->> DEPEND <<---- |
164 |
|
173 |
|
165 |
RDEPEND="sys-libs/zlib |
174 |
RDEPEND="sys-libs/zlib |
Lines 365-370
Link Here
|
365 |
fi |
374 |
fi |
366 |
fi |
375 |
fi |
367 |
|
376 |
|
|
|
377 |
# TODO: Add support for bootstraps for 5.4.0 and 6.3.0 for i686/arm/other arches. |
378 |
if in_iuse ada; then |
379 |
GCC_SRC_URI+=" amd64? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz ) |
380 |
x86? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz ) |
381 |
arm? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz )" |
382 |
fi |
383 |
|
368 |
echo "${GCC_SRC_URI}" |
384 |
echo "${GCC_SRC_URI}" |
369 |
} |
385 |
} |
370 |
|
386 |
|
Lines 411-416
Link Here
|
411 |
else |
427 |
else |
412 |
gcc_quick_unpack |
428 |
gcc_quick_unpack |
413 |
fi |
429 |
fi |
|
|
430 |
|
431 |
# Unpack the Ada bootstrap if we're using it. |
432 |
if in_iuse ada && ! type -P gnatbind > /dev/null; then |
433 |
mkdir -p "${WORKDIR}/gnat_bootstrap" || die "Couldn't make GNAT bootstrap directory" |
434 |
pushd "${WORKDIR}/gnat_bootstrap" > /dev/null || die |
435 |
|
436 |
case $(tc-arch) in |
437 |
amd64) |
438 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz || die "Failed to unpack AMD64 GNAT bootstrap compiler" |
439 |
;; |
440 |
x86) |
441 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz || die "Failed to unpack x86 GNAT bootstrap compiler" |
442 |
;; |
443 |
arm) |
444 |
unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz || die "Failed to unpack ARM GNAT bootstrap compiler" |
445 |
;; |
446 |
esac |
447 |
|
448 |
popd > /dev/null || die |
449 |
fi |
414 |
} |
450 |
} |
415 |
|
451 |
|
416 |
gcc_quick_unpack() { |
452 |
gcc_quick_unpack() { |
Lines 835-840
Link Here
|
835 |
fi |
871 |
fi |
836 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
872 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
837 |
|
873 |
|
|
|
874 |
# Add variables we need to make the build find the bootstrap compiler. |
875 |
# We only want to use the bootstrap compiler for stage 1 of bootstrap, this will build the necessary compilers, |
876 |
# then stage 2 uses these compilers. |
877 |
# |
878 |
# We only want to use the bootstrap when we don't have an already installed GNAT compiler. |
879 |
if in_iuse ada && [[ -d ${WORKDIR}/gnat_bootstrap ]] ; then |
880 |
# We need to tell the system about our cross compiler! |
881 |
export GNATBOOT="${WORKDIR}/gnat_bootstrap/usr" |
882 |
export PATH="${GNATBOOT}/bin:${PATH}" |
883 |
|
884 |
confgcc+=( |
885 |
CC=${GNATBOOT}/bin/gcc |
886 |
CXX=${GNATBOOT}/bin/g++ |
887 |
AR=${GNATBOOT}/bin/gcc-ar |
888 |
AS=as |
889 |
LD=ld |
890 |
NM=${GNATBOOT}/bin/gcc-nm |
891 |
RANLIB=${GNATBOOT}/bin/gcc-ranlib |
892 |
) |
893 |
fi |
894 |
|
838 |
confgcc+=( |
895 |
confgcc+=( |
839 |
--prefix="${PREFIX}" |
896 |
--prefix="${PREFIX}" |
840 |
--bindir="${BINPATH}" |
897 |
--bindir="${BINPATH}" |
Lines 861-866
Link Here
|
861 |
### language options |
918 |
### language options |
862 |
|
919 |
|
863 |
local GCC_LANG="c" |
920 |
local GCC_LANG="c" |
|
|
921 |
is_ada && GCC_LANG+=",ada" |
864 |
is_cxx && GCC_LANG+=",c++" |
922 |
is_cxx && GCC_LANG+=",c++" |
865 |
is_d && GCC_LANG+=",d" |
923 |
is_d && GCC_LANG+=",d" |
866 |
is_gcj && GCC_LANG+=",java" |
924 |
is_gcj && GCC_LANG+=",java" |
Lines 881-889
Link Here
|
881 |
is_f77 && GCC_LANG+=",f77" |
939 |
is_f77 && GCC_LANG+=",f77" |
882 |
is_f95 && GCC_LANG+=",f95" |
940 |
is_f95 && GCC_LANG+=",f95" |
883 |
|
941 |
|
884 |
# We do NOT want 'ADA support' in here! |
|
|
885 |
# is_ada && GCC_LANG+=",ada" |
886 |
|
887 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
942 |
confgcc+=( --enable-languages=${GCC_LANG} ) |
888 |
|
943 |
|
889 |
### general options |
944 |
### general options |
Lines 1704-1710
Link Here
|
1704 |
cd "${D}"${BINPATH} |
1759 |
cd "${D}"${BINPATH} |
1705 |
# Ugh: we really need to auto-detect this list. |
1760 |
# Ugh: we really need to auto-detect this list. |
1706 |
# It's constantly out of date. |
1761 |
# It's constantly out of date. |
1707 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do |
1762 |
if in_iuse ada ; then |
|
|
1763 |
local gnat_extra_bins="gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatlink gnatls gnatmake gnatname gnatprep gnatxref" |
1764 |
fi |
1765 |
|
1766 |
for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do |
1708 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1767 |
# For some reason, g77 gets made instead of ${CTARGET}-g77... |
1709 |
# this should take care of that |
1768 |
# this should take care of that |
1710 |
if [[ -f ${x} ]] ; then |
1769 |
if [[ -f ${x} ]] ; then |