1 msgSerious Bugs In Gcc Builds
1 msgproblems when move one pseudo reg to another (n...

Issue with fixincludes (?) and `limits.h'
\ Thomas Schwinge (3 Dec 2007)
. \ Ian Lance Taylor (3 Dec 2007)
. . \ Thomas Schwinge (3 Dec 2007)
. . . \ Ian Lance Taylor (4 Dec 2007)
. . . . \ Thomas Schwinge (4 Dec 2007)

1 msggcc-4.1-20071203 is now available
2 msgHow to reinterpret data in GIMPLE.
3 msg[RFC] Introduce middle-end expressions on arrays
84 msgRant about ChangeLog entries and commit messages
1 msg[RFC] Cleaning up latch blocks
1 msgADOPT A PUP OR KITTEN THIS XMAS.
2 msgproblems compiling a program with -m32
1 msggcc-4.3-20071130 is now available
11 msgvolatile and R/M/W operations
8 msgGNAT SVN trunk on PowerPC and SPARC
10 msgRe: Bug in builtins.def, the execve. don't use ...
9 msgDescribing commercial support on our website
2 msgBug in builtins.def, the execve.
1 msggcc-4.2-20071128 is now available
4 msgTestsuite infrastructure for comparing outputs
18 msgFunction specific optimizations call for discus...
12 msggnat1 huge time
Subject:Issue with fixincludes (?) and `limits.h'
Group:Gcc
From:Thomas Schwinge
Date:3 Dec 2007



Hello!

What is the reason for GCC (trunk version) installing the <limits.h>
header file as `PREFIX/lib/gcc/*/*/include-fixed/limits.h' instead of
putting it into `PREFIX/lib/gcc/*/*/include/', which is what
gcc-4_2-branch and earlier have been doing?

The leads to a problem as follows. You're about to bootstrap a cross
compiler from only source code. You build cross binutils. You build a
minimal bootstrapping GCC (``--with-sysroot=[...] --disable-shared
--disable-threads --without-headers --enable-languages=c''; ``make
all-gcc install-gcc all-target-libgcc install-target-libgcc''). Then you
attemp to bootstrap the glibc which will eventually fail like this:

#v+
i586-pc-gnu-gcc [...] -I[glibc internal] -nostdinc -isystem [GCC target]/4.3.0/include -isystem [sysroot]/include [glibc stuff]
In file included from ../sysdeps/unix/bsd/bsd4.4/bits/socket.h:31,
from [...]
../include/limits.h:125:26: error: limits.h: No such file or directory
#v-

Is this a GCC issue or should the glibc build system be adding a
``-isystem [GCC target]/4.3.0/include-fixed''?

#v+
$ find lib/gcc/*/*/ -name \*.h | sort
lib/gcc/i586-pc-gnu/4.3.0/include-fixed/limits.h
lib/gcc/i586-pc-gnu/4.3.0/include-fixed/syslimits.h
lib/gcc/i586-pc-gnu/4.3.0/include/ammintrin.h
lib/gcc/i586-pc-gnu/4.3.0/include/bmmintrin.h
lib/gcc/i586-pc-gnu/4.3.0/include/cpuid.h
[...]
lib/gcc/i586-pc-gnu/4.3.0/include/unwind.h
lib/gcc/i586-pc-gnu/4.3.0/include/varargs.h
lib/gcc/i586-pc-gnu/4.3.0/include/xmmintrin.h
lib/gcc/i586-pc-gnu/4.3.0/install-tools/gsyslimits.h
lib/gcc/i586-pc-gnu/4.3.0/install-tools/include/limits.h
#v-


Note that this can also be reproduced with a pseudo GNU/Linux to
GNU/Linux ``cross'' compiler, e.g., from `i686-pc-linux-gnu' to
`i586-pc-linux-gnu':

#v+
$ ../trunk-work/configure --target=i586-pc-linux-gnu --prefix=$(pwd).install --disable-nls --disable-shared --disable-threads --enable-languages=c --with-arch=i586
[...]
$ make all-gcc install-gcc
[...]
$ find $(pwd).install/lib/gcc/*/*/ -name \*.h | sort
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include-fixed/limits.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include-fixed/syslimits.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/ammintrin.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/bmmintrin.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/cpuid.h
[...]
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/unwind.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/varargs.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/include/xmmintrin.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/install-tools/gsyslimits.h
/home/thomas/tmp/source/gcc/trunk-work.build.install/lib/gcc/i586-pc-linux-gnu/4 .3.0/install-tools/include/limits.h
#v-

Why is `limits.h' put into `include-fixed/'? And what about this
`install-tools' directory which duplicates some of the files?


Regards,
Thomas




© 2004-2008 readlist.com