From e695f0101a8cacbc29353c5a000731e50b2627e6 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Tue, 20 Jul 2021 11:02:27 +0800 Subject: [PATCH] RISC-V: Detect python and pick best one for calling multilib-generator gcc/ * config.gcc (riscv*-*-*): Detect which python is available. --- gcc/config.gcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 93e2b32..3df9b52 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4730,9 +4730,10 @@ case "${target}" in echo "--with-multilib-list= can't used with --with-multilib-generator= at same time" 1>&2 exit 1 fi + PYTHON=`which python || which python3 || which python2` case "${target}" in riscv*-*-elf*) - if ${srcdir}/config/riscv/multilib-generator \ + if ${PYTHON} ${srcdir}/config/riscv/multilib-generator \ `echo ${with_multilib_generator} | sed 's/;/ /g'`\ > t-multilib-config; then -- 2.7.4