From: Kito Cheng Date: Tue, 20 Jul 2021 03:02:27 +0000 (+0800) Subject: RISC-V: Detect python and pick best one for calling multilib-generator X-Git-Tag: basepoints/gcc-13~5907 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e695f0101a8cacbc29353c5a000731e50b2627e6;p=thirdparty%2Fgcc.git RISC-V: Detect python and pick best one for calling multilib-generator gcc/ * config.gcc (riscv*-*-*): Detect which python is available. --- diff --git a/gcc/config.gcc b/gcc/config.gcc index 93e2b3219b99..3df9b52cf252 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