This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
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
Attachment:
signature.asc
Description: Digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |