Re: Building cross-compiler (missing stdio.h)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Adam Markiewicz" <amgo100@xxxxxxxxx> writes:

> I'm trying to build a cross-toolchain with x86_64 target. I've successfully
> compiled binutils-2.22, gmp-5.0.4, mpc-0.9 and mpfr-3.1.0, however I'm stuck
> with gcc-4.7.0. I configured it with
>
> ../gcc-4.7.0/configure
> --prefix=/cross-tools --build=$HOST --host=$HOST --target=$TARGET
> --with-sysroot=/mnt/root  --disable-shared --disable-nls
> --with-mpfr=/cross-tools --with-gmp=/cross-tools
> --without-ppl --without-cloog
> --disable-decimal-float --disable-libgomp --disable-libmudflap
> --disable-libssp --disable-threads --disable-multilib
> --enable-languages=c --without-headers
>
> and got the following error:
>
> make[2]: Entering directory
> `/mnt/root/sources/gcc-build/x86_64-cerebro-linux-gnu/libgcc'
> # If this is the top-level multilib, build all the other
> # multilibs.
> /mnt/root/sources/gcc-build/./gcc/xgcc -B/mnt/root/sources/gcc-build/./gcc/
> -B/cross-tools/x86_64-cerebro-linux-gnu/bin/
> -B/cross-tools/x86_64-cerebro-linux-gnu/lib/ -isystem
> /cross-tools/x86_64-cerebro-linux-gnu/include -isystem
> /cross-tools/x86_64-cerebro-linux-gnu/sys-include    -g -O2 -O2  -g -O2
> -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
> ./include   -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector
> -fpic -I. -I. -I../.././gcc -I../../../gcc-4.7.0/libgcc
> -I../../../gcc-4.7.0/libgcc/. -I../../../gcc-4.7.0/libgcc/../gcc
> -I../../../gcc-4.7.0/libgcc/../include  -DHAVE_CC_TLS  -DUSE_TLS -o
> _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c
> ../../../gcc-4.7.0/libgcc/libgcc2.c 
> In file included from ../../../gcc-4.7.0/libgcc/libgcc2.c:29:0:
> ../../../gcc-4.7.0/libgcc/../gcc/tsystem.h:88:19: fatal error: stdio.h: No
> such file or directory
> compilation terminated.
> make[2]: *** [_muldi3.o] Error 1
> make[2]: Leaving directory
> `/mnt/root/sources/gcc-build/x86_64-cerebro-linux-gnu/libgcc'
> make[1]: *** [all-target-libgcc] Error 2
> make[1]: Leaving directory `/mnt/root/sources/gcc-build'
>
> As I understand --without-headers option should prevent compiler from
> looking for libc headers. Why therefore it is looking for (and missing)
> stdio.h?


The --without-headers option is overridden by the --with-sysroot option.
If you supply --with-sysroot, the gcc build assumes that it can find the
header files under there.  In your case, the header files are expected
to be in /mnt/root/usr/include.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux