https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78110
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Bernd Edlinger from comment #1) > oh, I am using eCos and that is based on newlib but on a very very old one. > I don't know what happens when I dont use --with-newlib, but I can try... > > configure.ac has this: > # First, test for "known" system libraries. We may be using newlib even > # on a hosted environment. > if test "x${with_newlib}" = "xyes"; then > os_include_dir="os/newlib" > AC_DEFINE(HAVE_HYPOT) > > ... > > AC_DEFINE(HAVE_ICONV) > AC_DEFINE(HAVE_MEMALIGN) > > why are these not compile-time checks, to see if the headers are available? Ah .. it's supposed to be. See line 259: AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc) That was added to support the new code in libsupc++/new_opa.cc But it doesn't work for newlib, because of the hardcoded definitions on line 327. Presumably newlib does have memalign, but just not in malloc.h?