Lines 250-256
if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
Link Here
|
250 |
IUSE+=" go" |
250 |
IUSE+=" go" |
251 |
IUSE+=" +sanitize" TC_FEATURES+=( sanitize ) |
251 |
IUSE+=" +sanitize" TC_FEATURES+=( sanitize ) |
252 |
IUSE+=" graphite" TC_FEATURES+=( graphite ) |
252 |
IUSE+=" graphite" TC_FEATURES+=( graphite ) |
253 |
IUSE+=" ada" |
|
|
254 |
IUSE+=" vtv" |
253 |
IUSE+=" vtv" |
255 |
IUSE+=" jit" |
254 |
IUSE+=" jit" |
256 |
tc_version_is_between 5.0 9 && IUSE+=" mpx" |
255 |
tc_version_is_between 5.0 9 && IUSE+=" mpx" |
Lines 259-264
if [[ ${PN} != kgcc64 && ${PN} != gcc-* ]] ; then
Link Here
|
259 |
IUSE+=" systemtap" TC_FEATURES+=( systemtap ) |
258 |
IUSE+=" systemtap" TC_FEATURES+=( systemtap ) |
260 |
|
259 |
|
261 |
tc_version_is_at_least 9.0 && IUSE+=" d" TC_FEATURES+=( d ) |
260 |
tc_version_is_at_least 9.0 && IUSE+=" d" TC_FEATURES+=( d ) |
|
|
261 |
tc_version_is_at_least 9.0 && IUSE+=" ada" TC_FEATURES+=( ada ) |
262 |
tc_version_is_at_least 9.1 && IUSE+=" lto" |
262 |
tc_version_is_at_least 9.1 && IUSE+=" lto" |
263 |
tc_version_is_at_least 10 && IUSE+=" cet" |
263 |
tc_version_is_at_least 10 && IUSE+=" cet" |
264 |
tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=( zstd ) |
264 |
tc_version_is_at_least 10 && IUSE+=" zstd" TC_FEATURES+=( zstd ) |
Lines 284-291
fi
Link Here
|
284 |
|
284 |
|
285 |
#---->> DEPEND <<---- |
285 |
#---->> DEPEND <<---- |
286 |
|
286 |
|
287 |
RDEPEND=" |
287 |
RDEPEND="sys-libs/zlib |
288 |
sys-libs/zlib |
|
|
289 |
virtual/libiconv |
288 |
virtual/libiconv |
290 |
nls? ( virtual/libintl ) |
289 |
nls? ( virtual/libintl ) |
291 |
" |
290 |
" |
Lines 311-316
BDEPEND="
Link Here
|
311 |
>=sys-devel/autogen-5.5.4 |
310 |
>=sys-devel/autogen-5.5.4 |
312 |
) |
311 |
) |
313 |
" |
312 |
" |
|
|
313 |
|
314 |
# Ada in 9.0+ is self-hosting and needs Ada to bootstrap. |
315 |
# Taken from the D version below. I'm fairly sure if this is now correct, |
316 |
# We should build using either ada-bootstrap:<SLOT> if the installed gcc has |
317 |
# Ada disabled or the installed slot which matches the slot being built. |
318 |
if tc_has_feature ada ; then |
319 |
if tc_version_is_at_least 9.0 ; then |
320 |
BDEPEND+=" ada? ( || ( |
321 |
<sys-devel/gcc-${SLOT}[ada(-)] |
322 |
dev-lang/ada-bootstrap:${GCCMAJOR} |
323 |
) )" |
324 |
fi |
325 |
fi |
326 |
|
314 |
DEPEND="${RDEPEND}" |
327 |
DEPEND="${RDEPEND}" |
315 |
|
328 |
|
316 |
if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then |
329 |
if [[ ${PN} == gcc && ${PV} == *_p* ]] ; then |
Lines 341-352
if tc_has_feature valgrind ; then
Link Here
|
341 |
BDEPEND+=" valgrind? ( dev-util/valgrind )" |
354 |
BDEPEND+=" valgrind? ( dev-util/valgrind )" |
342 |
fi |
355 |
fi |
343 |
|
356 |
|
344 |
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler |
|
|
345 |
# supports Ada. |
346 |
if tc_has_feature ada ; then |
347 |
BDEPEND+=" ada? ( || ( sys-devel/gcc[ada] dev-lang/gnat-gpl[ada] ) )" |
348 |
fi |
349 |
|
350 |
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler |
357 |
# TODO: Add a pkg_setup & pkg_pretend check for whether the active compiler |
351 |
# supports D. |
358 |
# supports D. |
352 |
if tc_has_feature d && tc_version_is_at_least 12.0 ; then |
359 |
if tc_has_feature d && tc_version_is_at_least 12.0 ; then |
Lines 489-494
SRC_URI=$(get_gcc_src_uri)
Link Here
|
489 |
|
496 |
|
490 |
toolchain_pkg_pretend() { |
497 |
toolchain_pkg_pretend() { |
491 |
if ! _tc_use_if_iuse cxx ; then |
498 |
if ! _tc_use_if_iuse cxx ; then |
|
|
499 |
_tc_use_if_iuse ada && \ |
500 |
ewarn 'Ada requires a C++ compiler, disabled due to USE="-cxx"' |
492 |
_tc_use_if_iuse go && \ |
501 |
_tc_use_if_iuse go && \ |
493 |
ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"' |
502 |
ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"' |
494 |
_tc_use_if_iuse objc++ && \ |
503 |
_tc_use_if_iuse objc++ && \ |
Lines 784-789
toolchain_src_configure() {
Link Here
|
784 |
fi |
793 |
fi |
785 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
794 |
[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} ) |
786 |
|
795 |
|
|
|
796 |
if _tc_use_if_iuse ada ; then |
797 |
local PREVSLOT=$((${GCCMAJOR} - 1)) # Can't use SLOT because 9.5.0. |
798 |
einfo " >> Ada Bootstrap slot is ${GCCMAJOR}/${PREVSLOT}" |
799 |
|
800 |
# Make sure we set a path to the Ada bootstrap if gcc[ada] is not already |
801 |
# installed. GNAT can usually be built using the last major version and |
802 |
# the current version, at least. |
803 |
if has_version -b "sys-devel/gcc:${SLOT}[ada]" ; then |
804 |
einfo "Using GNAT compiler installed in slot ${SLOT}..." |
805 |
|
806 |
PATH="${BINPATH}:${PATH}" |
807 |
elif has_version -b "sys-devel/gcc:${PREVSLOT}[ada]" ; then |
808 |
einfo "Using GNAT compiler installed in previous slot ${PREVSLOT}..." |
809 |
|
810 |
PATH="${PREFIX}/${CTARGET}/gcc-bin/${PREVSLOT}:${PATH}" |
811 |
else |
812 |
einfo "Using bootstrap GNAT compiler..." |
813 |
|
814 |
PATH="/opt/ada-bootstrap-${GCCMAJOR}/bin:${PATH}" |
815 |
|
816 |
export PATH |
817 |
fi |
818 |
fi |
819 |
|
787 |
confgcc+=( |
820 |
confgcc+=( |
788 |
--prefix="${PREFIX}" |
821 |
--prefix="${PREFIX}" |
789 |
--bindir="${BINPATH}" |
822 |
--bindir="${BINPATH}" |
Lines 1335-1340
toolchain_src_configure() {
Link Here
|
1335 |
einfo "DATAPATH: ${DATAPATH}" |
1368 |
einfo "DATAPATH: ${DATAPATH}" |
1336 |
einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" |
1369 |
einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" |
1337 |
einfo "Languages: ${GCC_LANG}" |
1370 |
einfo "Languages: ${GCC_LANG}" |
|
|
1371 |
einfo "GCC version: $(gcc -v 2>&1|grep " version " | awk '{ print $3 }')" |
1372 |
is_ada && einfo "GNAT version: $(gnat 2>&1|grep GNAT | awk '{ print $2 }')" |
1338 |
echo |
1373 |
echo |
1339 |
|
1374 |
|
1340 |
# Build in a separate build tree |
1375 |
# Build in a separate build tree |
1341 |
- |
|
|