Hopefully can save others a little time.
The PATH to the gcc executables can't end with a '/' character or you
will get an error like "riscv32-unknown-elf-ld: cannot find -lgcc" (see
get_lib_path in vendor/hisi/hi3861/hi3861/build/scripts/scons_env_cfg.py).
eg. PATH=/gcc_riscv32/bin not PATH=/gcc_riscv32/bin/
Other requirements: the PATH to the executables must contain gcc_riscv32
and end with bin, and libgcc.a must be in the directory
../lib/gcc/riscv32-unknown-elf/<gcc version number>/ relative to the
executables directory. (ie. must be a relatively standard directory
structure). Might be relevant for those thinking of putting the
executables in $HOME/bin.
The scons_env_param_check in scons_utils.py performs the same check as
get_lib_path and supports ending with '/' so it may be fair to ask
HiSilicon to call this function instead.
I also needed to install the scons, pycrypto, and ecdsa packages for the
HiSilicon hi3861 build (available through pip).