https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117229
--- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Wait a minute, strstr in newlib has undefined code in it. It does: hs--; which might cause undefinedness. glibc version does not have that though. I am not sure if that is the issue here though.