Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-config:master commit in: /
Date: Sat, 07 Sep 2019 09:01:17
Message-Id: 1567846778.afe41adc6db361e43a32ea12966246eae6c68f18.slyfox@gentoo
1 commit: afe41adc6db361e43a32ea12966246eae6c68f18
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Sep 7 08:59:38 2019 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 7 08:59:38 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-config.git/commit/?id=afe41adc
7
8 gcc-config: drop empty /etc/env.d/05gcc-${CTARGET} files
9
10 Thesse files are generated for cross-gcc only. Were empty
11 since Aug 2018.
12
13 Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
14
15 README | 7 -------
16 gcc-config | 15 ++++++++++-----
17 2 files changed, 10 insertions(+), 12 deletions(-)
18
19 diff --git a/README b/README
20 index 48183b2..bba2517 100644
21 --- a/README
22 +++ b/README
23 @@ -49,13 +49,6 @@ Files, variables, things.
24
25 Used by env-update to populate PATH and more (TODO: remove PATH population).
26
27 - /etc/env.d/05gcc-${CTARGET} (cross)
28 -
29 - Empty.
30 -
31 - Before Aug 2018 used to contain paths for cross-compilers.
32 - To be removed eventually.
33 -
34 TODOs
35 -----
36
37
38 diff --git a/gcc-config b/gcc-config
39 index 92e9014..01e2b90 100755
40 --- a/gcc-config
41 +++ b/gcc-config
42 @@ -615,9 +615,8 @@ switch_profile() {
43
44 echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config-${CTARGET}"
45
46 - # Give the native gcc a higher precedence so its PATH gets
47 - # searched first. After all, we tend to run the native
48 - # compiler a *lot* more than the cross-compilers.
49 + # Give native configs slight distinction from cross-compilers
50 + # by giving it higher priority.
51 local envd envd_num envd_changed=0
52 is_cross_compiler && envd_num="05" || envd_num="04"
53 envd="${ENV_D}/${envd_num}gcc-${CTARGET}"
54 @@ -686,9 +685,15 @@ switch_profile() {
55 prefix_copy_gcc_libs
56 handle_split_usr
57 : $(( envd_changed += $? ))
58 +
59 + mv_if_diff "${envd}.tmp" "${envd}"
60 + : $(( envd_changed += $? ))
61 + else
62 + # cross-case
63 + # env.d file is empty since Aug 2018 and is cleaned up by
64 + # gcc-config since Sept 2019. Should be safe to remove in 2021.
65 + rm -f "${envd}.tmp" "${envd}"
66 fi
67 - mv_if_diff "${envd}.tmp" "${envd}"
68 - : $(( envd_changed += $? ))
69
70 update_wrappers ${CTARGET}