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
1 I would like to have comments about the followinf changes.
2 I "fear" the shopts nullglob a little
3
4 diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
5 index a3081c38bac1..aca10b4f37ed 100644
6 --- a/eclass/toolchain.eclass
7 +++ b/eclass/toolchain.eclass
8 @@ -1817,33 +1817,37 @@ toolchain_src_install() {
9 fi
10
11 dodir /etc/env.d/gcc
12 create_gcc_env_entry
13 create_revdep_rebuild_entry
14
15 # Setup the gcc_env_entry for hardened gcc 4 with minispecs
16 want_minispecs && copy_minispecs_gcc_specs
17
18 # Make sure we dont have stuff lying around that
19 # can nuke multiple versions of gcc
20 gcc_slot_java
21
22 dodir /usr/bin
23 cd "${D}"${BINPATH}
24 +
25 + shopt nullglob
26 + local gnat_extra_bins="gnat*"
27 +
28 # Ugh: we really need to auto-detect this list.
29 # It's constantly out of date.
30 - for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ; do
31 + for x in cpp gcc g++ c++ gcov g77 gcj gcjh gfortran gccgo ${gnat_extra_bins} ; do
32 # For some reason, g77 gets made instead of ${CTARGET}-g77...
33 # this should take care of that
34 if [[ -f ${x} ]] ; then
35 # In case they're hardlinks, clear out the target first
36 # otherwise the mv below will complain.
37 rm -f ${CTARGET}-${x}
38 mv ${x} ${CTARGET}-${x}
39 fi
40
41 if [[ -f ${CTARGET}-${x} ]] ; then
42 if ! is_crosscompile ; then
43 ln -sf ${CTARGET}-${x} ${x}
44 dosym ${BINPATH#${EPREFIX}}/${CTARGET}-${x} \
45 /usr/bin/${x}-${GCC_CONFIG_VER}
46 fi

Replies

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