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 / +69 lines)
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 [[ ! -f `which gnatbind 2>&1|tee /dev/null` ]]; 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
	GNAT_STRAP_DIR="${WORKDIR}/gnat_strap"
170
fi
171
164
#---->> DEPEND <<----
172
#---->> DEPEND <<----
165
173
166
RDEPEND="sys-libs/zlib
174
RDEPEND="sys-libs/zlib
Lines 355-360 Link Here
355
		fi
363
		fi
356
	fi
364
	fi
357
365
366
	if in_iuse ada && [[ -n ${GNAT_STRAP_DIR} ]] ; then
367
		GCC_SRC_URI+=" amd64? ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz )
368
					   x86?   ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz )
369
					   arm?   ( https://dev.gentoo.org/~nerdboy/files/gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz )"
370
	fi
371
358
	echo "${GCC_SRC_URI}"
372
	echo "${GCC_SRC_URI}"
359
}
373
}
360
374
Lines 401-406 Link Here
401
	else
415
	else
402
		gcc_quick_unpack
416
		gcc_quick_unpack
403
	fi
417
	fi
418
419
	# Unpack the Ada bootstrap if we're using it.
420
	if in_iuse ada && [[ -n ${GNAT_STRAP_DIR} ]] ; then
421
		if [ ! -d ${GNAT_STRAP_DIR} ]; then
422
			mkdir -p ${GNAT_STRAP_DIR} > /dev/null || die "Couldn't make GNAT bootstrap directory"
423
		fi
424
425
		pushd ${GNAT_STRAP_DIR} >&/dev/null || die
426
427
		case $(tc-arch) in
428
			amd64)
429
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-amd64.tar.xz || die "Failed to unpack AMD64 GNAT bootstrap compiler"
430
				;;
431
			x86)
432
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-i686.tar.xz || die "Failed to unpack x86 GNAT bootstrap compiler"
433
				;;
434
			arm)
435
				unpack gnatboot-${GNAT_BOOTSTRAP_VERSION}-arm.tar.xz || die "Failed to unpack ARM GNAT bootstrap compiler"
436
				;;
437
		esac
438
439
		popd >&/dev/null || die
440
	fi
404
}
441
}
405
442
406
gcc_quick_unpack() {
443
gcc_quick_unpack() {
Lines 805-810 Link Here
805
	fi
842
	fi
806
	[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} )
843
	[[ -n ${CBUILD} ]] && confgcc+=( --build=${CBUILD} )
807
844
845
	# Add variables we need to make the build find the bootstrap compiler.
846
	# We only want to use the bootstrap compiler for stage 1 of bootstrap, this will build the necessary compilers,
847
	# then stage 2 uses these compilers.
848
	#
849
	# We only want to use the bootstrap when we don't have an already installed GNAT compiler.
850
	if in_iuse ada && [[ -n ${GNAT_STRAP_DIR} ]] ; then
851
		# We need to tell the system about our cross compiler!
852
		export GNATBOOT=${GNAT_STRAP_DIR}/usr
853
		export PATH="${GNATBOOT}/bin:${PATH}"
854
855
		EXTRA_ECONF+=(
856
			CC=${GNATBOOT}/bin/gnatgcc
857
			CXX=${GNATBOOT}/bin/gnatg++
858
			AR=${GNATBOOT}/bin/ar
859
			AS=${GNATBOOT}/bin/as
860
			LD=${GNATBOOT}/bin/ld
861
			NM=${GNATBOOT}/bin/nm
862
			RANLIB=${GNATBOOT}/bin/ranlib
863
		)
864
865
		einfo "EXTRA_ECONF=\"${EXTRA_ECONF}\""
866
	fi
867
808
	confgcc+=(
868
	confgcc+=(
809
		--prefix="${PREFIX}"
869
		--prefix="${PREFIX}"
810
		--bindir="${BINPATH}"
870
		--bindir="${BINPATH}"
Lines 851-858 Link Here
851
	is_f77 && GCC_LANG+=",f77"
911
	is_f77 && GCC_LANG+=",f77"
852
	is_f95 && GCC_LANG+=",f95"
912
	is_f95 && GCC_LANG+=",f95"
853
913
854
	# We do NOT want 'ADA support' in here!
914
	# We DO want 'Ada support' in here!
855
	# is_ada && GCC_LANG+=",ada"
915
	is_ada && GCC_LANG+=",ada"
856
916
857
	confgcc+=( --enable-languages=${GCC_LANG} )
917
	confgcc+=( --enable-languages=${GCC_LANG} )
858
918
Lines 1669-1675 Link Here
1669
	cd "${D}"${BINPATH}
1729
	cd "${D}"${BINPATH}
1670
	# Ugh: we really need to auto-detect this list.
1730
	# Ugh: we really need to auto-detect this list.
1671
	#      It's constantly out of date.
1731
	#      It's constantly out of date.
1672
	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
1732
1733
	if in_iuse ada ; then
1734
		GNAT_EXTRA_BINS="gnat gnatbind gnatchop gnatclean gnatfind gnatkr gnatlink gnatls gnatmake gnatname gnatprep gnatxref"
1735
	fi
1736
1737
	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...
1738
		# For some reason, g77 gets made instead of ${CTARGET}-g77...
1674
		# this should take care of that
1739
		# this should take care of that
1675
		if [[ -f ${x} ]] ; then
1740
		if [[ -f ${x} ]] ; then

Return to bug 592060