With a simple line of code I got a development environment for cross compiling RISC-V binaries:
guix shell -e '((@ (gnu packages cross-base) cross-gcc) "riscv64-linux-gnu" #:libc ((@ (gnu packages cross-base) cross-libc) "riscv64-linux-gnu"))' -e '((@ (gnu packages cross-base) cross-libc) "riscv64-linux-gnu")'
and with another one I got it built:
CROSS_LIBRARY_PATH=/gnu/store/1kr4p36dhw31aqmn9835w7f1is3xz1v4-profile/lib riscv64-linux-gnu-gcc src/hello-world/hello.c