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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.
-- 
2.29.2

Reply via email to