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

Collapse All | Expand All

(-)toolchain.eclass (-5 / +107 lines)
Lines 146-157 Link Here
146
	tc_version_is_at_least 4.1 && IUSE+=" libssp objc++"
146
	tc_version_is_at_least 4.1 && IUSE+=" libssp objc++"
147
	tc_version_is_at_least 4.2 && IUSE_DEF+=( openmp )
147
	tc_version_is_at_least 4.2 && IUSE_DEF+=( openmp )
148
	tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
148
	tc_version_is_at_least 4.3 && IUSE+=" fixed-point"
149
	tc_version_is_at_least 4.6 && IUSE+=" ada"
149
	tc_version_is_at_least 4.7 && IUSE+=" go"
150
	tc_version_is_at_least 4.7 && IUSE+=" go"
150
	# Note: while <=gcc-4.7 also supported graphite, it required forked ppl
151
	# Note: while <=gcc-4.7 also supported graphite, it required forked ppl
151
	# versions which we dropped.  Since graphite was also experimental in
152
	# versions which we dropped.  Since graphite was also experimental in
152
	# 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
153
	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 )
154
	tc_version_is_at_least 4.9 && IUSE+=" cilk"
155
	tc_version_is_at_least 4.9 && IUSE+=" cilk"
156
	# Compiling the Ada compiler requires an Ada compiler,
157
	# and GNATBOOT_SRC_URI specifies the binary images.
158
	in_iuse ada && IUSE+=${GNATBOOT_SRC_URI:+" gnatboot"}
155
fi
159
fi
156
160
157
[[ ${EAPI:-0} != 0 ]] && IUSE_DEF=( "${IUSE_DEF[@]/#/+}" )
161
[[ ${EAPI:-0} != 0 ]] && IUSE_DEF=( "${IUSE_DEF[@]/#/+}" )
Lines 223-228 Link Here
223
	DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
227
	DEPEND+=" gcj? ( awt? ( ${GCJ_GTK_DEPS} ) ${GCJ_DEPS} )"
224
fi
228
fi
225
229
230
if in_iuse ada ; then
231
	# Need some Ada compiler to build the Ada compiler:
232
	# Either from installed compiler, ...
233
	GNAT_DEPS="sys-devel/gcc[ada(-)]"
234
	if in_iuse gnatboot ; then
235
		# or from pre-built images, specified via GNATBOOT_SRC_URI.
236
		GNAT_DEPS="!gnatboot? ( ${GNAT_DEPS} )"
237
	fi
238
	DEPEND+=" ada? ( ${GNAT_DEPS} ) "
239
	# TODO: cross support
240
fi
241
226
PDEPEND=">=sys-devel/gcc-config-1.7"
242
PDEPEND=">=sys-devel/gcc-config-1.7"
227
243
228
#---->> S + SRC_URI essentials <<----
244
#---->> S + SRC_URI essentials <<----
Lines 362-367 Link Here
362
		fi
378
		fi
363
	fi
379
	fi
364
380
381
	if in_iuse gnatboot ; then
382
		GCC_SRC_URI+=" ada? ( gnatboot? ( ${GNATBOOT_SRC_URI} ) )"
383
	fi
384
365
	echo "${GCC_SRC_URI}"
385
	echo "${GCC_SRC_URI}"
366
}
386
}
367
387
Lines 385-390 Link Here
385
		use_if_iuse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="-cxx"'
405
		use_if_iuse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="-cxx"'
386
	fi
406
	fi
387
407
408
	if use_if_iuse ada ; then
409
		if tc-is-cross-compiler || is_crosscompile ; then
410
			# FIXME
411
			ewarn "Cross-compiling Ada not supported yet, disabled"
412
		fi
413
	fi
414
388
	want_minispecs
415
	want_minispecs
389
}
416
}
390
417
Lines 409-414 Link Here
409
		gcc_quick_unpack
436
		gcc_quick_unpack
410
	fi
437
	fi
411
438
439
	if use_if_iuse gnatboot ; then
440
		local a
441
		for a in ${A} ; do
442
			[[ ${a} == gnatboot-* ]] && unpack ${a}
443
		done
444
	fi
445
412
	case ${EAPI:-0} in
446
	case ${EAPI:-0} in
413
		0|1)   toolchain_src_prepare ;;
447
		0|1)   toolchain_src_prepare ;;
414
	esac
448
	esac
Lines 846-851 Link Here
846
	is_d   && GCC_LANG+=",d"
880
	is_d   && GCC_LANG+=",d"
847
	is_gcj && GCC_LANG+=",java"
881
	is_gcj && GCC_LANG+=",java"
848
	is_go  && GCC_LANG+=",go"
882
	is_go  && GCC_LANG+=",go"
883
	is_ada && GCC_LANG+=",ada"
849
	if is_objc || is_objcxx ; then
884
	if is_objc || is_objcxx ; then
850
		GCC_LANG+=",objc"
885
		GCC_LANG+=",objc"
851
		if tc_version_is_at_least 4 ; then
886
		if tc_version_is_at_least 4 ; then
Lines 861-869 Link Here
861
	is_f77 && GCC_LANG+=",f77"
896
	is_f77 && GCC_LANG+=",f77"
862
	is_f95 && GCC_LANG+=",f95"
897
	is_f95 && GCC_LANG+=",f95"
863
898
864
	# We do NOT want 'ADA support' in here!
865
	# is_ada && GCC_LANG+=",ada"
866
867
	confgcc+=( --enable-languages=${GCC_LANG} )
899
	confgcc+=( --enable-languages=${GCC_LANG} )
868
900
869
	### general options
901
	### general options
Lines 1200-1205 Link Here
1200
		confgcc+=( $(use_enable sanitize libsanitizer) )
1232
		confgcc+=( $(use_enable sanitize libsanitizer) )
1201
	fi
1233
	fi
1202
1234
1235
	if is_ada ; then
1236
		confgcc+=( --enable-libada )
1237
		if use_if_iuse gnatboot ; then
1238
			local x gnatbin= gnatlib=()
1239
			for x in "${WORKDIR}"/etc/env.d/gcc/* ; do
1240
				[[ -s ${x} ]] || continue
1241
				gnatbin=$(
1242
					PATH=
1243
					. "${x}"
1244
					echo "${WORKDIR}/${PATH##/}"
1245
				) || continue
1246
				gnatlib=( $(
1247
					LDPATH=
1248
					. "${x}"
1249
					IFS=:
1250
					for x in ${LDPATH} ; do
1251
						echo "${WORKDIR}/${x##/}"
1252
					done
1253
				) ) || continue
1254
				[[ ${gnatbin} ]] && break
1255
			done
1256
			if [[ -z ${gnatbin} ]] ; then
1257
				# old >gnatboot-4.1 image used by gnatbuild.eclass
1258
				gnatbin=${WORKDIR}/usr/bin
1259
				gnatlib=( ${WORKDIR}/usr/lib )
1260
				export CPATH=${gnatlib}/include
1261
				export LIB_DIR=${gnatlib}
1262
				export LDFLAGS=-L${gnatlib}
1263
				export LIBRARY_PATH=${gnatlib}
1264
			fi
1265
			export PATH=${gnatbin}:${PATH}
1266
			pushd "${gnatbin}" 2>/dev/null
1267
			for x in gnat{bind,chop,clean,find,kr,link,ls,make,mem,name,prep,sym,xref} \
1268
			; do
1269
				[[ -x ./${x} ]] && export ${x^^}=${gnatbin}/${x}
1270
			done
1271
			# CC and CXX need to be the same version as GNAT-tools
1272
			for x in gnatgcc gcc; do
1273
				[[ -x ./${x} ]] && export CC=${gnatbin}/${x}
1274
			done
1275
			tc_version_is_at_least 4.8 &&
1276
			for x in gnatg++ g++; do
1277
				[[ -x ./${x} ]] && export CXX=${gnatbin}/${x}
1278
			done
1279
			popd > /dev/null
1280
			for x in "${gnatlib[@]}" ; do
1281
				ADA_OBJECTS_PATH+=${ADA_OBJECTS_PATH:+:}${x}/adalib
1282
				ADA_INCLUDE_PATH+=${ADA_INCLUDE_PATH:+:}${x}/adainclude
1283
			done
1284
			export ADA_OBJECTS_PATH ADA_INCLUDE_PATH
1285
		fi
1286
	fi
1287
1203
	# Disable gcc info regeneration -- it ships with generated info pages
1288
	# Disable gcc info regeneration -- it ships with generated info pages
1204
	# already.  Our custom version/urls/etc... trigger it.  #464008
1289
	# already.  Our custom version/urls/etc... trigger it.  #464008
1205
	export gcc_cv_prog_makeinfo_modern=no
1290
	export gcc_cv_prog_makeinfo_modern=no
Lines 1219-1224 Link Here
1219
	einfo "LIBPATH:         ${LIBPATH}"
1304
	einfo "LIBPATH:         ${LIBPATH}"
1220
	einfo "DATAPATH:        ${DATAPATH}"
1305
	einfo "DATAPATH:        ${DATAPATH}"
1221
	einfo "STDCXX_INCDIR:   ${STDCXX_INCDIR}"
1306
	einfo "STDCXX_INCDIR:   ${STDCXX_INCDIR}"
1307
	if is_ada ; then
1308
		local x
1309
		for x in cc cxx gnat{bind,chop,clean,find,kr,link,ls,make,mem,name,prep,sym,xref} \
1310
		; do
1311
			eval "einfo \"(Ada) ${x^^}: \${${x^^}}\""
1312
		done
1313
	fi
1222
	echo
1314
	echo
1223
	einfo "Languages:       ${GCC_LANG}"
1315
	einfo "Languages:       ${GCC_LANG}"
1224
	echo
1316
	echo
Lines 1654-1660 Link Here
1654
	cd "${D}"${BINPATH}
1746
	cd "${D}"${BINPATH}
1655
	# Ugh: we really need to auto-detect this list.
1747
	# Ugh: we really need to auto-detect this list.
1656
	#      It's constantly out of date.
1748
	#      It's constantly out of date.
1657
	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
1749
	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo \
1750
		gnat{bind,chop,clean,find,kr,link,ls,make,mem,name,prep,sym,xref} \
1751
	; do
1658
		# For some reason, g77 gets made instead of ${CTARGET}-g77...
1752
		# For some reason, g77 gets made instead of ${CTARGET}-g77...
1659
		# this should take care of that
1753
		# this should take care of that
1660
		[[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
1754
		[[ -f ${x} ]] && mv ${x} ${CTARGET}-${x}
Lines 2100-2107 Link Here
2100
}
2194
}
2101
2195
2102
is_ada() {
2196
is_ada() {
2197
	if tc-is-cross-compiler || is_crosscompile ; then
2198
		# FIXME: Cross-compiling Ada not supported yet
2199
		return 1
2200
	fi
2201
	if use_if_iuse gnatboot ; then
2202
		# does GNATBOOT_SRC_URI define a gnatboot image for current arch?
2203
		[[ " ${A}" == *" gnatboot-"* ]] || return 1
2204
	fi
2103
	gcc-lang-supported ada || return 1
2205
	gcc-lang-supported ada || return 1
2104
	use ada
2206
	use_if_iuse ada
2105
}
2207
}
2106
2208
2107
is_cxx() {
2209
is_cxx() {

Return to bug 547358