I am having some issues with building GCC-4.5.2 - Pass 2.
I am using Arch linux i686 for the host system and building for i686.

When I use the following from the book

     CC="$LFS_TGT-gcc -B/tools/lib/" \
     AR=$LFS_TGT-ar \
     RANLIB=$LFS_TGT-ranlib \
     ../$pkgname-$pkgver/configure \
     --with-local-prefix=/tools \
     --enable-clocale=gnu \
     --enable-shared \
     --enable-threads=posix \
     --enable-__cxa_atexit \
     --enable-languages=c,c++ \
     --disable-libstdcxx-pch \
     --disable-multilib \
     --disable-bootstrap \
     --disable-libgomp \
     --with-gmp-include=$(pwd)/gmp \
     --with-gmp-lib=$(pwd)/gmp/.libs \
     --without-ppl \
     --without-cloog
     make -j3

I get the following result:

/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.5.2/../../../../i686-lfs-linux-gnu/bin/ld:
 
cannot find crti.o: No such file or directory
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.5.2/../../../../i686-lfs-linux-gnu/bin/ld:
 
cannot find -lc
/mnt/lfs/tools/bin/../lib/gcc/i686-lfs-linux-gnu/4.5.2/../../../../i686-lfs-linux-gnu/bin/ld:
 
cannot find crtn.o: No such file or directory
collect2: ld returned 1 exit status
make[3]: *** [libgcc_s.so] Error 1
make[3]: Leaving directory 
`/mnt/lfs/build/tools/gcc-pass-2/gcc-build/i686-pc-linux-gnu/libgcc'
make[2]: *** [all-target-libgcc] Error 2
make[2]: Leaving directory `/mnt/lfs/build/tools/gcc-pass-2/gcc-build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/lfs/build/tools/gcc-pass-2/gcc-build'

crti.o and crtn.o are in the proper place /tools/lib as per ls 
/tools/lib and yep they are there.

I did some looking around and and I see that     CC="$LFS_TGT-gcc 
-B/tools/lib/" \ should have resulted in those libs being found.

When I add  --prefix=/tools \ to the above at the configure step and gcc 
complied and linked successfully ( as much as I can tell ) .
All the chapers leading up to this point are good...I get the result 
that the book says I should...again as far as I can tell.

What is the  --with-local-prefix=/tools \ really do, I haven't come to 
grips with that yet/
I do know what --prefix=/tools is about

I am good to go with gcc or did I make a mess?

Comments/help/flames/etc welcome.

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to