Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 592060 | Differences between
and this patch

Collapse All | Expand All

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

Return to bug 592060