resolved by adding the following line in the "build.sh" file
Original build command:
CC= CXX= build_project riscv-pk --prefix=$RISCV --host=riscv64-unknown-elf
updated build command:
CC= CXX= build_project riscv-pk --prefix=$RISCV --host=riscv64-unknown-elf --with-arch=rv64gc_zifencei