openwch/ch32v307

No FPU support with libmath

Schildkroet opened this issue · 0 comments

Hello,

i have a CH32V307VCT6 where i set up FPU support.
image


Custom sin()-func
If i implement my own sin()-func, the compiler makes use of the FPU:
image

And the compiler doesn't link in any special libraries:
image


sin()-func from libmath
If i use sin()-func from math.h lib, the compiler uses soft floating point emulation and links in big soft float functions https://gcc.gnu.org/onlinedocs/gccint/Soft-float-library-routines.html:
image


How can i use FPU with libmath, so i don't have to write my own float math functions?