I'm trying to build the blinky example where I added a simple cos() and included math.h, with a toolchain based on the esp-open-sdk toolchain, and using the ESP8266_NONOS_SDK-2.2.0.
However it fails at linking stage because of the cos() with errors like these:
.../xtensa-lx106-elf/lib/libm.a(lib_a-k_rem_pio2.o):(.literal+0x1c): undefined reference to '__gedf2'
I tried several linker flags as -lm, -lmirom, etc at various position, and even the libmirom.a from the RTOS SDK as suggested here (https://bbs.espressif.com/viewtopic.php ... math#p3254) but with same error. And according to this same post the math library IS implemented.
So, how do you link or use the math library ?

Thx!