RISC-V: Detect python and pick best one for calling multilib-generator

gcc/

	* config.gcc (riscv*-*-*): Detect which python is available.
This commit is contained in:
Kito Cheng 2021-07-20 11:02:27 +08:00
parent 1c0d49b9ce
commit e695f0101a

View File

@ -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