This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
bootstrap/8180: --without-headers configure option not working
- From: pgarrone at linuxmail dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 10 Oct 2002 00:14:04 -0000
- Subject: bootstrap/8180: --without-headers configure option not working
- Reply-to: pgarrone at linuxmail dot org
>Number: 8180
>Category: bootstrap
>Synopsis: --without-headers configure option not working
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 09 17:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: pgarrone@linuxmail.org
>Release: gcc-3.2
>Organization:
>Environment:
building an sh4 xcompiler on a mandrake linux intel system
>Description:
The file gcc/configure does not set inhibit_libc if --without-headers is set, as this translates to --with-headers=no. So the bootstrap fails in compilation.
This is my own personal patch, which I urge you to study closely.
>How-To-Repeat:
host=i686-pc-linux-gnu
build=$host
target=sh-linux-gnu
../../gcc/configure \
--target=$target \
--prefix=$prefix \
--host=$host \
--build=$build \
-v \
--without-headers \
--enable-languages=c \
--with-cpu=sh4 \
--disable-threads
make all install
>Fix:
diff -r -C 5 gcc-3.2.orig/gcc/configure gcc-3.2/gcc/configure
*** gcc-3.2.orig/gcc/configure Sat Jun 29 10:20:11 2002
--- gcc-3.2/gcc/configure Thu Oct 10 09:08:54 2002
***************
*** 6787,6803 ****
# 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; then
! inhibit_libc=-Dinhibit_libc
! else
! if test x$with_newlib = xyes; then
! inhibit_libc=-Dinhibit_libc
! fi
fi
# When building gcc with a cross-compiler, we need to adjust things so
# that the generator programs are still built with the native compiler.
--- 6787,6807 ----
# 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.
!
! # If --without-headers was an option, then define inhibit_libc.
! # But if inhibit_libc is previously defined, leave it.
! if test x${inhibit_libc} = x
! then
! if ( ( test x$host != x$target && test x$with_headers = x) \
! || ( test x${with_headers} = xno ) \
! || ( test x$with_newlib = xyes ) \
! ); then
! inhibit_libc=-Dinhibit_libc
! fi
fi
# When building gcc with a cross-compiler, we need to adjust things so
# that the generator programs are still built with the native compiler.
>Release-Note:
>Audit-Trail:
>Unformatted: