This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX, the configure script happily copies the glibc include files from include to sys-include; here's the line from the log file (with $PREFIX instead of the real prefix): Copying $PREFIX/i686-unknown-linux-gnu/include to $PREFIX/i686-unknown-linux-gnu/sys-include But later, when running fixincludes, it gives the error message The directory that should contain system headers does not exist: $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include Nevertheless, it continues building; the header files it installs in $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include do not include the boilerplate that would cause it to #include_next the glibc headers in the system header directory. Thus the resulting toolchain can't compile the following program: #include <limits.h> int x = PATH_MAX; because its limits.h doesn't include the glibc header. The problem is that gcc/Makefile.in assumes that it can refer to $PREFIX/i686-unknown-linux-gnu with the path $PREFIX/lib/../i686-unknown-linux-gnu, but that fails because the directory $PREFIX/lib doesn't exist during 'make all'; it is only created later, during 'make install'. (Which makes this problem confusing, since one only notices the breakage well after 'make install', at which point the path configure complained about does exist, and has the right stuff in it.) I posted a proposed fix to http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00751.html
Keating wrote in http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01345.html >Needs a ChangeLog entry, but otherwise OK. > >A key detail that you left out of your patch description is that >SYSTEM_HEADER_DIR is used *only* for fixincludes and similar; it is not actually >put into the compiler. If the path was used in the compiler, this patch would >not be OK, because it would mean the compiler couldn't be moved to a different >place after installation. I haven't looked at the patch again after reading his comment (just saw it now), but I intend to.
I think this is a dup of bug 7088 but I cannot prove it for sure.
Subject: Bug 22541 Author: bernds Date: Wed May 17 13:54:38 2006 New Revision: 113859 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113859 Log: PR bootstrap/22541 From Dan Kegel <dank@kegel.com>: * Makefile.in: Strip "dir/../" combinations from SYSTEM_INCLUDE_DIR. Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in
Subject: Bug 22541 Author: bernds Date: Tue Jun 13 14:39:42 2006 New Revision: 114611 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114611 Log: PR bootstrap/22541 From Dan Kegel <dank@kegel.com>: * Makefile.in: Strip "dir/../" combinations from SYSTEM_INCLUDE_DIR. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/Makefile.in
Fixed in 4.1.2 and the mainline.