I'm trying to build my own "Linux From Scratch" distro, following the LFS guide at linuxfromscratch.org. I've compiled and installed binutils (the first package to be compiled) and now I'm trying to compile gcc. First, I configured it like this:
Code:
CC="gcc -B/usr/bin/" ../gcc-4.1.2/configure --prefix=/tools --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c
Then, upon running "make bootstrap" I get this error after a while:
Code:
/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/mnt/lfs/tools/gcc-build/gcc'
make: *** [bootstrap] Error 2
I've compiled plenty of programs from source before, but this is my first attempt at compiling my own distro. Any help would be appreciated. Thanks very much in advance!

EDIT: /tools is a symlink to /mnt/lfs/tools. /mnt/lfs is the partition I'm building the distro on. The tools directory is the directory containing the sources of the basic programs and utilities. The CC command above was executed from within /mnt/lfs/tools. So ../gcc-4.1.2/configure refers to /mnt/lfs/gcc-4.1.2... etc.