From: Kito Cheng Date: Wed, 23 Dec 2020 15:34:50 +0000 (-0800) Subject: RISC-V: Fix python3 compatibility for multilib-generator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=168be2b3afddd41d4575ed55439231812bc3e7c9;p=gcc.git RISC-V: Fix python3 compatibility for multilib-generator 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. --- diff --git a/gcc/config/riscv/multilib-generator b/gcc/config/riscv/multilib-generator index ccfd9ea18ea..64ff15f449b 100755 --- 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.