code changes for new RISC-V GCC toolchain