1 |
commit: b4acbf4935bfa8162304444fde8448629ac4a839 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jul 31 12:22:42 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jul 31 12:22:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b4acbf49 |
7 |
|
8 |
lib/_emerge/actions.py: drop custom clang identification |
9 |
|
10 |
drop this bit, because: |
11 |
- there are no native Clang toolchains in use in Prefix currently |
12 |
- it isn't guaranteed to be correct |
13 |
- we can just rely on PATH because this isn't anything but cosmetics |
14 |
- it is cosmetics, it isn't necessary for Prefix to operate correctly |
15 |
- it is disputed to be correct in the first place: |
16 |
https://github.com/gentoo/portage/pull/876 |
17 |
|
18 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
19 |
|
20 |
lib/_emerge/actions.py | 40 ++-------------------------------------- |
21 |
1 file changed, 2 insertions(+), 38 deletions(-) |
22 |
|
23 |
diff --git a/lib/_emerge/actions.py b/lib/_emerge/actions.py |
24 |
index bf00133e8..e2f3f2ccf 100644 |
25 |
--- a/lib/_emerge/actions.py |
26 |
+++ b/lib/_emerge/actions.py |
27 |
@@ -36,7 +36,6 @@ from portage import shutil |
28 |
from portage import _encodings, _unicode_decode |
29 |
from portage.binrepo.config import BinRepoConfigLoader |
30 |
from portage.const import BINREPOS_CONF_FILE, _DEPCLEAN_LIB_CHECK_DEFAULT |
31 |
-from portage.const import EPREFIX |
32 |
from portage.dbapi.dep_expand import dep_expand |
33 |
from portage.dbapi._expand_new_virt import expand_new_virt |
34 |
from portage.dbapi.IndexedPortdb import IndexedPortdb |
35 |
@@ -2951,19 +2950,6 @@ def getgccversion(chost=None): |
36 |
gcc_ver_command = ["gcc", "-dumpversion"] |
37 |
gcc_ver_prefix = "gcc-" |
38 |
|
39 |
- # BEGIN PREFIX LOCAL: accept clang as system compiler too |
40 |
- clang_ver_command = ['clang', '--version'] |
41 |
- clang_ver_prefix = 'clang-' |
42 |
- |
43 |
- ubinpath = os.path.join('/', portage.const.EPREFIX, 'usr', 'bin') |
44 |
- |
45 |
- def getclangversion(output): |
46 |
- version = re.search('clang version ([0-9.]+) ', output) |
47 |
- if version: |
48 |
- return version.group(1) |
49 |
- return "unknown" |
50 |
- # END PREFIX LOCAL |
51 |
- |
52 |
gcc_not_found_error = red( |
53 |
"!!! No gcc found. You probably need to 'source /etc/profile'\n" |
54 |
+ "!!! to update the environment of this terminal and possibly\n" |
55 |
@@ -2972,10 +2958,8 @@ def getgccversion(chost=None): |
56 |
|
57 |
if chost: |
58 |
try: |
59 |
- # PREFIX LOCAL: use ubinpath |
60 |
proc = subprocess.Popen( |
61 |
- [ubinpath + "/" + "gcc-config", "-c"], |
62 |
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT |
63 |
+ ["gcc-config", "-c"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT |
64 |
) |
65 |
except OSError: |
66 |
myoutput = None |
67 |
@@ -2987,10 +2971,8 @@ def getgccversion(chost=None): |
68 |
return myoutput.replace(chost + "-", gcc_ver_prefix, 1) |
69 |
|
70 |
try: |
71 |
- # PREFIX LOCAL: use ubinpath |
72 |
proc = subprocess.Popen( |
73 |
- [ubinpath + "/" + chost + "-" + gcc_ver_command[0]] |
74 |
- + gcc_ver_command[1:], |
75 |
+ [chost + "-" + gcc_ver_command[0]] + gcc_ver_command[1:], |
76 |
stdout=subprocess.PIPE, |
77 |
stderr=subprocess.STDOUT, |
78 |
) |
79 |
@@ -3003,24 +2985,6 @@ def getgccversion(chost=None): |
80 |
if mystatus == os.EX_OK: |
81 |
return gcc_ver_prefix + myoutput |
82 |
|
83 |
- # BEGIN PREFIX LOCAL: try Clang |
84 |
- try: |
85 |
- proc = subprocess.Popen( |
86 |
- [ubinpath + "/" + chost + "-" + clang_ver_command[0]] |
87 |
- + clang_ver_command[1:], |
88 |
- stdout=subprocess.PIPE, |
89 |
- stderr=subprocess.STDOUT, |
90 |
- ) |
91 |
- except OSError: |
92 |
- myoutput = None |
93 |
- mystatus = 1 |
94 |
- else: |
95 |
- myoutput = _unicode_decode(proc.communicate()[0]).rstrip("\n") |
96 |
- mystatus = proc.wait() |
97 |
- if mystatus == os.EX_OK: |
98 |
- return clang_ver_prefix + getclangversion(myoutput) |
99 |
- # END PREFIX LOCAL |
100 |
- |
101 |
try: |
102 |
proc = subprocess.Popen( |
103 |
gcc_ver_command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT |