This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: --without-headers and --with-newlib configure options


booleandomain <booleandomain@gmail.com> writes:

> I have some doubts about the --without-headers and --with-newlib
> options when configuring a cross-compiler.
>
> The only source of informations about these options I'm aware of is
> http://gcc.gnu.org/install/configure.html. There it is written:
>
> --without-headers: Tells GCC not use any target headers from a libc
> when building a cross compiler.
> --with-newlib: Specifies that `newlib' is being used as the target C
> library.
>
> In other words --without-headers means not to use any libc headers,
> while --with-newlib means to use newlib headers. So in my opinion
> --without-headers --with-newlib doesn't make any sense. Despite of
> this, I have often seen in the web both options used at the same
> time. Why?

Normally if you use --with-newlib the compiler will build the gcc
support library, libgcc, without requiring any external support from the
C library.  Using --without-headers will disable that, and the gcc
support library will be built without requiring any library support.
This disables a few features which are generally uninteresting for
embedded systems.

--with-newlib is still useful even when using --without-headers, because
the newlib header files will be used for libraries other than libgcc,
such as libstdc++.

Ian


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