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 (-4 / +65 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
	GNAT_BOOTSTRAP_VERSION="4.9"
170
fi
171
163
#---->> DEPEND <<----
172
#---->> DEPEND <<----
164
173
165
RDEPEND="sys-libs/zlib
174
RDEPEND="sys-libs/zlib
Lines 361-366 Link Here
361
		fi
370
		fi
362
	fi
371
	fi
363
372
373
	# TODO: Add support for bootstraps for 5.4.0 and 6.3.0
374
	if in_iuse ada; then
375
		GCC_SRC_URI+=" amd64? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz )
376
				x86?   ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz )
377
				arm?   ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz )"
378
	fi
379
364
	echo "${GCC_SRC_URI}"
380
	echo "${GCC_SRC_URI}"
365
}
381
}
366
382
Lines 407-412 Link Here
407
	else
423
	else
408
		gcc_quick_unpack
424
		gcc_quick_unpack
409
	fi
425
	fi
426
427
	# Unpack the Ada bootstrap if we're using it.
428
	if in_iuse ada && ! type -P gnatbind > /dev/null; then
429
		mkdir -p "${WORKDIR}/gnat_bootstrap" || die "Couldn't make GNAT bootstrap directory"
430
		pushd "${WORKDIR}/gnat_bootstrap" > /dev/null || die
431
432
		case $(tc-arch) in
433
			amd64)
434
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz || die "Failed to unpack AMD64 GNAT bootstrap compiler"
435
				;;
436
			x86)
437
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz || die "Failed to unpack x86 GNAT bootstrap compiler"
438
				;;
439
			arm)
440
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz || die "Failed to unpack ARM GNAT bootstrap compiler"
441
				;;
442
		esac
443
444
		popd > /dev/null || die
445
	fi
410
}
446
}
411
447
412
gcc_quick_unpack() {
448
gcc_quick_unpack() {
Lines 827-832 Link Here
827
	fi
863
	fi
828
	[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} )
864
	[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} )
829
865
866
	# Add variables we need to make the build find the bootstrap compiler.
867
	# We only want to use the bootstrap compiler for stage 1 of bootstrap, this will build the necessary compilers,
868
	# then stage 2 uses these compilers.
869
	#
870
	# We only want to use the bootstrap when we don't have an already installed GNAT compiler.
871
	if in_iuse ada && [[ -d ${WORKDIR}/gnat_bootstrap ]] ; then
872
		# We need to tell the system about our cross compiler!
873
		export GNATBOOT="${WORKDIR}/gnat_bootstrap/usr"
874
		export PATH="${GNATBOOT}/bin:${PATH}"
875
876
		confgcc+=(
877
			CC=${GNATBOOT}/bin/gnatgcc
878
			CXX=${GNATBOOT}/bin/gnatg++
879
			AR=${GNATBOOT}/bin/gcc-ar
880
			AS=as
881
			LD=ld
882
			NM=${GNATBOOT}/bin/gcc-nm
883
			RANLIB=${GNATBOOT}/bin/gcc-ranlib
884
		)
885
	fi
886
830
	confgcc+=(
887
	confgcc+=(
831
		--prefix="${PREFIX}"
888
		--prefix="${PREFIX}"
832
		--bindir="${BINPATH}"
889
		--bindir="${BINPATH}"
Lines 873-880 Link Here
873
	is_f77 && GCC_LANG+=",f77"
930
	is_f77 && GCC_LANG+=",f77"
874
	is_f95 && GCC_LANG+=",f95"
931
	is_f95 && GCC_LANG+=",f95"
875
932
876
	# We do NOT want 'ADA support' in here!
933
	# We DO want 'Ada support' in here!
877
	# is_ada && GCC_LANG+=",ada"
934
	is_ada && GCC_LANG+=",ada"
878
935
879
	confgcc+=( --enable-languages=${GCC_LANG} )
936
	confgcc+=( --enable-languages=${GCC_LANG} )
880
937
Lines 1696-1702 Link Here
1696
	cd "${D}"${BINPATH}
1753
	cd "${D}"${BINPATH}
1697
	# Ugh: we really need to auto-detect this list.
1754
	# Ugh: we really need to auto-detect this list.
1698
	#      It's constantly out of date.
1755
	#      It's constantly out of date.
1699
	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
1756
	if in_iuse ada ; then
1757
		local gnat_extra_bins="gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatlink gnatls gnatmake gnatname gnatprep gnatxref"
1758
	fi
1759
1760
	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do
1700
		# For some reason, g77 gets made instead of ${CTARGET}-g77...
1761
		# For some reason, g77 gets made instead of ${CTARGET}-g77...
1701
		# this should take care of that
1762
		# this should take care of that
1702
		if [[ -f ${x} ]] ; then
1763
		if [[ -f ${x} ]] ; then

Return to bug 592060