This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sys-include/newlib.h


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]