moved here from the newlib branch