RISC-V: Explicitly call python when using multilib generator

When building GCC for RISC-V with the --with-multilib-generator option,
it may not be possible to call arch-canonicalize as an executable when
building on Windows. Instead directly invoke the expected python
interpreter for this step.

gcc/ChangeLog:

	* config/riscv/multilib-generator (arch_canonicalize): Invoke
	python interpreter when calling arch-canonicalize script.
This commit is contained in:
Simon Cook 2020-12-09 10:39:28 +00:00 committed by Kito Cheng
parent 73cf5da233
commit 8d63e3c229
1 changed files with 2 additions and 1 deletions

View File

@ -54,7 +54,8 @@ def arch_canonicalize(arch):
this_file = os.path.abspath(os.path.join( __file__))
arch_can_script = \
os.path.join(os.path.dirname(this_file), "arch-canonicalize")
proc = subprocess.Popen([arch_can_script, arch], stdout=subprocess.PIPE)
proc = subprocess.Popen([sys.executable, arch_can_script, arch],
stdout=subprocess.PIPE)
out, err = proc.communicate()
return out.strip()