https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61580
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- The problem in this case is that newlib only defines C99 functions for C99 or C++11, but the _GLIBCXX_USE_C99 tests in acinclude.m4 are compiled with -std=gnu++98. As discussed previously (on the mailing list IIRC) we need to test whether C99 functions are available in C++98 mode and test again whether they are available in C++11 mode. For std::stoi() we don't care if they are missing in C++98 mode, as long as they are present in C++11 mode (which is true for newlib).