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

See the CrossGCC FAQ for lots more information.


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: why crosstool use --with-newlib to build gcc-core


Bridge Wu wrote:
> I noticed crosstool-0.42 use --with-newlib to build gcc-core which
> will be used to build glibc. I wonder why --with-newlib is used since
> we are building glibc, not newlib. Who can interpret the  exact
> meaning of --with-newlib?

In older versions of gcc/configure, you will find the following snippet:

# If this is a cross-compiler that does not
# have its own set of headers then define
# inhibit_libc

# If this is using newlib, then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
inhibit_libc=
if { test x$host != x$target && test "x$with_headers" = x &&
     test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; then
       inhibit_libc=-Dinhibit_libc
fi

Ergo, the with_newlib option was "abused" to force the inhibit_libc
variable to be true; inhibit_libc makes sure the compiler doesn't use
any libc headers.

This was changed later, to check for an empty with-headers option:
http://gcc.gnu.org/viewcvs?view=rev&revision=67396

and later yet again, to check for with-headers=no:
http://gcc.gnu.org/viewcvs?view=rev&revision=70634

In summary: these days the --with-newlib option should not be needed,
but it's probably kept in crosstool for compatibility with older gcc
releases.

--
For unsubscribe information see http://sourceware.org/lists.html#faq


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