This is the mail archive of the
mailing list for the newlib project.
- From: Jeff Johnston <jjohnstn at redhat dot com>
- To: Jon Beniston <jon at beniston dot com>
- Cc: newlib at sourceware dot org
- Date: Fri, 9 Dec 2016 14:06:55 -0500 (EST)
- Subject: Re: sys-include/newlib.h
- Authentication-results: sourceware.org; auth=none
- References: <firstname.lastname@example.org>
What you are trying is unsupported. Newlib configuration needs to run.
Have you tried --with-newlib? You might need to add a configure-target-newlib
or all-target-newlib target to your configure call.
-- Jeff J.
----- Original Message -----
> I'm compiling newlib 2.4.0 with gcc 6.1 configured as a cross compiler. In
> order for some gcc libc support to be built, I need to configure with
> This results in the .h files from that directory being copied to
> target/sys-include. GCC's built in search path searches target/sys-include
> before target/include. This results in a bit of a problem when compiling C++
> code, as target/sys-include/newlib.h differs from target/include/newlib.h
> target/sys-include/newlib.h is an otherwise empty file that just says:
> /* dummy file for external tools to use. Real file is created by
> newlib configuration. */
> Whereas target/include/newlib.h includes the newlib configuration macros,
> such as:
> #define _HAVE_LONG_DOUBLE 1
> This causes an error "'::strtold' has not been declared" when compiling C++
> code, as the prototype for this function in stdlib.h, depends on this macro:
> #ifdef _HAVE_LONG_DOUBLE
> extern long double strtold (const char *__restrict, char **__restrict);
> #endif /* _HAVE_LONG_DOUBLE */
> Which is not defined as target/sys-include/newlib.h is included instead of
> The same applies to _newlib_version.h too.
> And ideas on the best way to resolve this? Is it a gcc or newlib problem or
> user error?