sys-include/newlib.h

Sebastian Huber sebastian.huber@embedded-brains.de
Mon Dec 12 12:21:00 GMT 2016


On 12/12/16 12:47, Jon Beniston wrote:
> 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.

Thanks for your explanation. Looks like a tough problem.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Newlib mailing list