After some testings, and check your script and link (thanks for both), i'm having a different problem: while building gcc step 2, and libgcc: libgcc/../gcc/libgcc2.c:29: /opt/x/usr/include/pthread.h:25:19: fatal error: sched.h: No such file or directory In pthread.h I can see the include line is this one: #include <sched.h> while headers are located at include/linux/sched.h shouldn't it be: #include <linux/sched.h> thanks! On Tue, Apr 3, 2012 at 4:18 PM, Alberich de megres <alberich2k5@xxxxxxxxx> wrote: > Hi Ian, thanks for the support. > > I understand what you just explained, but I kept the same > --with-sysroot=$XSYSROOT across all the stages (and also all other > packages, binutils kernel headers and uclibc). > > > > > > On Tue, Apr 3, 2012 at 3:37 PM, Ian Lance Taylor <iant@xxxxxxxxxx> wrote: >> Alberich de megres <alberich2k5@xxxxxxxxx> writes: >> >>> I am using --with-sysroot=/opt/x, on both gcc stage 1 and final. >>> you can check the configurations in my first email. >>> >>> But my problem is that uclibc files are at: >>> /opt/x/usr/arm-linux-uclibc/usr/include/stdio.h >>> >>> Do I need to change for gcc final stage the sysroot to: >>> --with-sysroot=/opt/x/usr/arm-linux-uclibc/ >> >> From your description that should be the sysroot at every stage. >> >> The basic rule is that --with-sysroot should point at the directory that >> is the root of the file system as seen on the target system. On the >> target system you will have a file /usr/include/stdio.h. Therefore the >> sysroot should be /opt/x/usr/arm-linux-uclibc, because that will ensure >> that ${sysroot}/usr/include/stdio.h exists. >> >> Ian