Skip to content

Commit

Permalink
Update toolchain to support std::remainder (#7849)
Browse files Browse the repository at this point in the history
Update newlib to enable the __ieee754_remainder(f) calls required by
std::remainder and others.

Add device test for std::remainder variants.

Fixes #7845
  • Loading branch information
earlephilhower committed Jan 29, 2021
1 parent 39d1453 commit 20413f8
Show file tree
Hide file tree
Showing 13 changed files with 95 additions and 87 deletions.
Binary file modified bootloaders/eboot/eboot.elf
Binary file not shown.
174 changes: 87 additions & 87 deletions package/package_esp8266com_index.template.json

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions tests/device/test_sw_newlib/test_sw_newlib.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <BSTest.h>
#include <cmath>
BS_ENV_DECLARE();


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


TEST_CASE("#7845 std::remainder works", "[newlib]")
{
CHECK(fabs(std::remainder((double)10.123456, (double)5.0) - (double)0.123456) < 1e-5);
CHECK(fabs(std::remainder((float)15.123456, (float)5.0) - (float)0.123456) < 1e-5);
}

void loop()
{
}
Binary file modified tools/sdk/lib/libbearssl.a
Binary file not shown.
Binary file modified tools/sdk/lib/libhal.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip2-1460-feat.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip2-1460.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip2-536-feat.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip2-536.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip6-1460-feat.a
Binary file not shown.
Binary file modified tools/sdk/lib/liblwip6-536-feat.a
Binary file not shown.
Binary file modified tools/sdk/lib/libstdc++-exc.a
Binary file not shown.
Binary file modified tools/sdk/lib/libstdc++.a
Binary file not shown.

0 comments on commit 20413f8

Please sign in to comment.