This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: sys-include/newlib.h
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: Jon Beniston <jon at beniston dot com>, newlib at sourceware dot org
- Cc: 'Jeff Johnston' <jjohnstn at redhat dot com>
- Date: Mon, 12 Dec 2016 13:21:43 +0100
- Subject: Re: sys-include/newlib.h
- Authentication-results: sourceware.org; auth=none
- References: <84b001d25232$da74dd20$8f5e9760$@beniston.com> <212353526.2559217.1481310415007.JavaMail.zimbra@redhat.com> <84da01d2525d$7b9eb340$72dc19c0$@beniston.com> <584E83D6.3080003@embedded-brains.de> <00bd01d2546b$298a77a0$7c9f66e0$@beniston.com> <584E8AF1.8090209@embedded-brains.de> <00c201d2546d$86dcee40$9496cac0$@beniston.com>
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.