On 2/28/12 8:41 AM, Jeremy Huntwork wrote:
> Indeed. newlib isn't shipped with GCC, the switch appears to just prep
> GCC to expect the functions newlib has. When Ryan first suggested this
> one, he may have intended it to force inhibit_libc variable to be true
> as per http://sourceware.org/ml/crossgcc/2006-08/msg00060.html
>
> I'll test without the switch as it may no longer be necessary.
It's still necessary. There is a check for the use of newlib in
gcc/configure:
----
# If this is a cross-compiler that does not
# have its own set of headers then define
# inhibit_libc
# If this is using newlib, without having the headers available now,
# then define inhibit_libc in LIBGCC2_CFLAGS.
# This prevents libgcc2 from containing any code which requires libc
# support.
: ${inhibit_libc=false}
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
test x$with_newlib = xyes ; } &&
{ test "x$with_headers" = x || test "x$with_headers" = xno ; } ; then
inhibit_libc=true
fi
----
And then this in its Makefile.in:
----
# "true" if the target C library headers are unavailable; "false"
# otherwise.
inhibit_libc = @inhibit_libc@
ifeq ($(inhibit_libc),true)
INHIBIT_LIBC_CFLAGS = -Dinhibit_libc
endif
----
So it's either use the --with-newlib switch or hard code inhibit_libc =
true in the gcc/Makefile.in
JH
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page