-Dinhibit_libc not being set in gcc-3.4/gcc/configure?

Dan Kegel dank@kegel.com
Thu Aug 14 06:00:00 GMT 2003


My build script, which happily built gcc-3.3.1/glibc-2.3.2,
now fails with

In file included from /crosstool-0.18/build/powerpc-750-linux-gnu/gcc-3.4-20030813-glibc-2.3.2/gcc-3.4-20030813/gcc/tsystem.h:75,
                  from /crosstool-0.18/build/powerpc-750-linux-gnu/gcc-3.4-20030813-glibc-2.3.2/gcc-3.4-20030813/gcc/crtstuff.c:62:
/crosstool-0.18/result/powerpc-750-linux-gnu/gcc-3.4-20030813-glibc-2.3.2/powerpc-750-linux-gnu/include/stdio.h:138:28: bits/stdio_lim.h: No such file or directory
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `/crosstool-0.18/build/powerpc-750-linux-gnu/gcc-3.4-20030813-glibc-2.3.2/build-gcc-core/gcc'
make: *** [all-gcc] Error 2

I configure the bootstrap gcc with
      ${GCC_DIR}/configure --target=$TARGET --host=$HOST --prefix=$PREFIX \
         --with-local-prefix=${PREFIX}/${TARGET} \
         --disable-multilib \
         --with-newlib \
         --without-headers \
         --disable-nls \
         --enable-threads=no \
         --enable-symvers=gnu \
         --enable-__cxa_atexit \
         --enable-languages=c \
         --disable-shared

--with-newlib used to force -Dinhibit_libc, but it looks like it doesn't
in gcc-3.4.  Here's the new code in gcc/configure:

# 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=
if { { test x$host != x$target && test "x$with_sysroot" = x ; } ||
        test x$with_newlib = xyes ; } &&
      test "x$with_headers" = x ; then
        inhibit_libc=-Dinhibit_libc
fi

which is more complex that in gcc-3.3.  Setting -x before running this shows

+ inhibit_libc=
+ test xi686-host_pc-linux-gnu '!=' xpowerpc-750-linux-gnu
+ test x = x
+ test xno = x

And aha, it looks like --without-headers is setting $with_headers to 'no',
which is misinterpreted by the new line
      test "x$with_headers" = x ; then
in gcc/configure.  Should that be
      test "x$with_headers" = xno ; then
or something of the sort?

- Dan

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list