how to link math library when building bare metal application with custom linker script

I am building a RISC-V cpu core, and i am trying to build some C code for it. I have some basic code compiling and linking the way i want and working just fine, for example this: asm("li sp, 0x390...