sys-include/newlib.h

Jon Beniston jon@beniston.com
Mon Dec 12 11:47:00 GMT 2016


Hi Sebastian,

> In your original mail you mention a C++ problem. Which libgcc file needs something from Newlib?

When configuring gcc, the variable inhibit_libc in gcc/Makefile will be set to true, unless either --with-headers is used to point to newlib/libc/include or target headers are already installed (i.e. newlib has already been configured, built and installed).

inhibit_libc affects how various functions in libgcc/libgcc2.c, libgcc/libgcov and libgcc/unwing-sjlj.c are built.

The problem with using --with-headers, is that newlib/libc/include/newlib.h is empty (i.e. it's not the version generated by configure) and the root configure scripts copies this to target/sys-include. So if you then try to compile C++ code later on, you end up with this empty version of newlib.h being used, instead of the configure generated version in target/include - and this means some required #defines are missing and consequentially prototypes needed from newlib by cstdlib are missing.

Regards,
Jon




More information about the Newlib mailing list