public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: Alfredo Tupone <tupone@gentoo.org>, gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] toolchain.eclass more friendly about ada/gnat
Date: Sat, 23 Nov 2019 10:41:14 +0000	[thread overview]
Message-ID: <20191123104114.5acbc5e1@sf> (raw)
In-Reply-To: <20191123091642.5544ecee@alfredo-i5>

On Sat, 23 Nov 2019 09:16:42 +0100
Alfredo Tupone <tupone@gentoo.org> wrote:

> 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

You can also drop 'shopt nullglob'/'local gnat_extra_bins="gnat*"' and use 'gnat*' directly:
    for x in ... gnat* ; do
All the code below if guarded by [[ -f ${x} ]] anyway.

>  		# 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
> 

-- 

  Sergei


      reply	other threads:[~2019-11-23 10:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-23  8:16 [gentoo-dev] toolchain.eclass more friendly about ada/gnat Alfredo Tupone
2019-11-23 10:41 ` Sergei Trofimovich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191123104114.5acbc5e1@sf \
    --to=slyfox@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=tupone@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox