[Solved] Problems linking with math library - undefined "__fpclassifyd"
Posted: Thu Sep 29, 2016 5:16 am
I have some code that is including "math.h" from components/newlib/include/math.h
In that header there is an external reference to:
when I link my application, I am getting an error stating:
It is important to note that the link step I am using is the following:
I also found a mysterious file called "components/newlib/lib/extracted/romsys" which appears to list the entry "__fpclassifyd".
Can anyone spot where I must possibly be going wrong?
In that header there is an external reference to:
Code: Select all
extern int __fpclassifyd (double x);
Code: Select all
jswrap_functions.c:(.text.jswrap_parseInt+0x27): undefined reference to `__fpclassifyd'
Code: Select all
xtensa-esp32-elf-gcc -Winline -Og -Wl,--gc-sections -nostdlib -u call_user_start_cpu0 \
-Wl,--gc-sections -Wl,-static -Wl,-EL \
-Wl,--start-group \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.common.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.rom.ld \
-T/home/pi/projects/esp32/esp-idf/components/esp32/ld/esp32.peripherals.ld \
/home/pi/projects/esp32/esp-idf/components/newlib/lib/libc.a \
/home/pi/projects/esp32/esp-idf/components/newlib/lib/libm.a \
-Wl,--end-group -o espruino_1v87.213_esp32.elf src/jslex.o .... // many more .o files
Can anyone spot where I must possibly be going wrong?