The attach patch is specific to the RTEMS RISC-V architecture multilib which is controlled by the t-rtems file in the gcc/config/riscv/ directory. The patch file was created from the gcc-13.3.0 branch. It was successfully tested within RTEMS Source Builder.
gcc-13.3.0-RTEMS-riscv-multilib.patch
Description: gcc-13.3.0-RTEMS-riscv-multilib.patch