Gentoo Archives: gentoo-dev

From: Alfredo Tupone <tupone@g.o>
To: gentoo development <gentoo-dev@l.g.o>
Subject: [gentoo-dev] toolchain.eclass more friendly about ada/gnat
Date: Sat, 23 Nov 2019 08:16:55
Message-Id: 20191123091642.5544ecee@alfredo-i5
I would like to have comments about the followinf changes.
I "fear" the shopts nullglob a little

diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index a3081c38bac1..aca10b4f37ed 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1817,33 +1817,37 @@ toolchain_src_install() {
 	fi
 
 	dodir /etc/env.d/gcc
 	create_gcc_env_entry
 	create_revdep_rebuild_entry
 
 	# Setup the gcc_env_entry for hardened gcc 4 with minispecs
 	want_minispecs && copy_minispecs_gcc_specs
 
 	# Make sure we dont have stuff lying around that
 	# can nuke multiple versions of gcc
 	gcc_slot_java
 
 	dodir /usr/bin
 	cd "${D}"${BINPATH}
+
+	shopt nullglob
+	local gnat_extra_bins="gnat*"
+
 	# Ugh: we really need to auto-detect this list.
 	#      It's constantly out of date.
-	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
+	for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do
 		# For some reason, g77 gets made instead of ${CTARGET}-g77...
 		# this should take care of that
 		if [[ -f ${x} ]] ; then
 			# In case they're hardlinks, clear out the target first
 			# otherwise the mv below will complain.
 			rm -f ${CTARGET}-${x}
 			mv ${x} ${CTARGET}-${x}
 		fi
 
 		if [[ -f ${CTARGET}-${x} ]] ; then
 			if ! is_crosscompile ; then
 				ln -sf ${CTARGET}-${x} ${x}
 				dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
 					/usr/bin/${x}-${GCC_CONFIG_VER}
 			fi

Replies

Subject Author
Re: [gentoo-dev] toolchain.eclass more friendly about ada/gnat Sergei Trofimovich <slyfox@g.o>