I have deleted everything in my build directory. Then I ran configure again. The thing is my binutils are named riscv64-ar, riscv64-as, riscv64-ld not riscv64-elf-ar, riscv64-elf-as etc. It seems it is default behavior. How do I tell configure it should use these?