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