Skip to content

Commit 20413f8

Browse files
Update toolchain to support std::remainder (esp8266#7849)
Update newlib to enable the __ieee754_remainder(f) calls required by std::remainder and others. Add device test for std::remainder variants. Fixes esp8266#7845
1 parent 39d1453 commit 20413f8

13 files changed

+95
-87
lines changed

bootloaders/eboot/eboot.elf

-188 Bytes
Binary file not shown.

package/package_esp8266com_index.template.json

+87-87
Large diffs are not rendered by default.

tests/device/test_sw_newlib/test_sw_newlib.ino

+8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <BSTest.h>
2+
#include <cmath>
23
BS_ENV_DECLARE();
34

45

@@ -30,6 +31,13 @@ TEST_CASE("#612 fmod and sqrt work", "[newlib]")
3031
CHECK(fabs(fmod(-10, -3) - (-1.0)) < 1e-5);
3132
}
3233

34+
35+
TEST_CASE("#7845 std::remainder works", "[newlib]")
36+
{
37+
CHECK(fabs(std::remainder((double)10.123456, (double)5.0) - (double)0.123456) < 1e-5);
38+
CHECK(fabs(std::remainder((float)15.123456, (float)5.0) - (float)0.123456) < 1e-5);
39+
}
40+
3341
void loop()
3442
{
3543
}

tools/sdk/lib/libbearssl.a

-2.96 KB
Binary file not shown.

tools/sdk/lib/libhal.a

0 Bytes
Binary file not shown.

tools/sdk/lib/liblwip2-1460-feat.a

1.28 KB
Binary file not shown.

tools/sdk/lib/liblwip2-1460.a

1.16 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536-feat.a

1.29 KB
Binary file not shown.

tools/sdk/lib/liblwip2-536.a

1.15 KB
Binary file not shown.

tools/sdk/lib/liblwip6-1460-feat.a

1.18 KB
Binary file not shown.

tools/sdk/lib/liblwip6-536-feat.a

1.18 KB
Binary file not shown.

tools/sdk/lib/libstdc++-exc.a

0 Bytes
Binary file not shown.

tools/sdk/lib/libstdc++.a

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)