- Notifications
You must be signed in to change notification settings - Fork13.3k
Closed
Description
Basic Infos
- This issue complies with theissue POLICY doc.
- I have read the documentation atreadthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware:ESP8285
- Core Version:c2393d0
- Development Env:PlatformIO
- Operating System:Windows
Settings in IDE
Defaults:
[env]platform = espressif8266board = d1_miniframework = arduino[env:git]platform_packages = platformio/framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git mcspr/toolchain-xtensa @ 5.100200.201223
Problem Description
std::remainder breaks the linker
ref.https://gitter.im/esp8266/Arduino?at=6011fd5f063b6c68d520a704
@earlephilhower
MCVE Sketch
#include<Arduino.h>#include<cmath>doubledoes_this_work(double,double) __attribute((noinline));doubledoes_this_work(double a,double b) {returnstd::remainder(a, b);}voidsetup() { Serial.println(does_this_work(1.2345,5.4321));}voidloop() {}
Debug Messages
Compiling .pio\build\git\src\main.cpp.oLinking .pio\build\git\firmware.elfc:/users/maxim/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: c:/users/maxim/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/lib\libm.a(lib_a-w_remainder.o):(.literal+0x0): undefined reference to `__ieee754_remainder'c:/users/maxim/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/bin/ld.exe: c:/users/maxim/.platformio/packages/toolchain-xtensa/bin/../lib/gcc/xtensa-lx106-elf/10.2.0/../../../../xtensa-lx106-elf/lib\libm.a(lib_a-w_remainder.o): in function `remainder':/workdir/repo/newlib/newlib/libm/math/w_remainder.c:60: undefined reference to `__ieee754_remainder'collect2.exe: error: ld returned 1 exit status*** [.pio\build\git\firmware.elf] Error 1Metadata
Metadata
Assignees
Labels
No labels