projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
085fd2a
)
RISC-V: Fix python3 compatibility for multilib-generator
author
Kito Cheng
<kito.cheng@sifive.com>
Wed, 23 Dec 2020 15:34:50 +0000
(07:34 -0800)
committer
Kito Cheng
<kito.cheng@sifive.com>
Thu, 24 Dec 2020 02:59:14 +0000
(10:59 +0800)
The subprocess return string is raw bytes in python3, it must decode
before used as string, verifed with python2 and python3.
gcc/ChangeLog:
* config/riscv/multilib-generator (arch_canonicalize): Call
decode for the subprocess return value.
gcc/config/riscv/multilib-generator
patch
|
blob
|
history
diff --git
a/gcc/config/riscv/multilib-generator
b/gcc/config/riscv/multilib-generator
index ccfd9ea18ea3103d0b7800d6f6db8d5f7aa55559..64ff15f449b0b92def91c18b5761c7a8f0ff4c69 100755
(executable)
--- a/
gcc/config/riscv/multilib-generator
+++ b/
gcc/config/riscv/multilib-generator
@@
-57,7
+57,7
@@
def arch_canonicalize(arch):
proc = subprocess.Popen([sys.executable, arch_can_script, arch],
stdout=subprocess.PIPE)
out, err = proc.communicate()
- return out.strip()
+ return out.
decode().
strip()
#
# Handle expansion operation.