Installation of GCC on the LFS system
After you unpacked the gcc-2.95.2.1 archive don't enter the newly created
gcc-2.95.2.1 directory but stay in the $LFS/usr/src directory. Install GCC by
running the following commands:
mkdir $LFS/usr/src/gcc-build &&
cd $LFS/usr/src/gcc-build &&
../gcc-2.95.2.1/configure --prefix=/usr \
--with-gxx-include-dir=/usr/include/g++
\
--enable-languages=c,c++ --disable-nls
&&
make -e LDFLAGS=-static bootstrap &&
make prefix=$LFS/usr local_prefix=$LFS/usr/local
\
gxx_include_dir=$LFS/usr/include/g++
install &&
cd $LFS/lib &&
ln -s ../usr/lib/gcc-lib/*/2.95.2.1/cpp cpp
&&
cd $LFS/usr/lib &&
ln -s gcc-lib/*/2.95.2.1/cpp cpp
&&
cd $LFS/usr/bin &&
ln -s gcc cc