[lfs-support] Error while compiling GCC 4.6.1 Pass 1

jasonpsage at jegas.com jasonpsage at jegas.com
Wed Jan 4 17:36:16 PST 2012


> But it went wrong with gcc-4.6.1 :
>
> Franck Chuiton <franck at chuiton.fr>



Frank - there are some special steps - I'm hoping between the BOOK and
what I'm about to PASTE form my script you can figure out what is wrong.
(I can't tell from reading your errors either but I'm a
build--your-own-linux new person also - but a long time Unix user -
20years - but this stuff makes me feel like I'm starting from scratch)


Anyways... you're supposed to be logged in as the user "lfs" for this
part and the environement variables $LFS should point to /mnt/lfs/  

BASH CODE SNIPPET ------------------------------BEGIN

#------------------------------------------------------------------------------
echo COMPILE: gcc-4.6.1
#------------------------------------------------------------------------------
cd $LFS/sources/gcc-4.6.1
tar -jxf $LFS/lfs7/Jegas/downloads/mpfr-3.1.0.tar.bz2
rm -R mpfr
mv -v mpfr-3.1.0 mpfr
tar -jxf $LFS/lfs7/Jegas/downloads/gmp-5.0.2.tar.bz2
rm -R gmp
mv -v gmp-5.0.2 gmp
tar -zxf $LFS/lfs7/Jegas/downloads/mpc-0.9.tar.gz
rm -R mpc
mv -v mpc-0.9 mpc
patch -Np1 -i ../gcc-4.6.1-cross_compile-1.patch
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.6.1/configure \
--target=$LFS_TGT --prefix=/tools \
--disable-nls --disable-shared --disable-multilib \
--disable-decimal-float --disable-threads \
--disable-libmudflap --disable-libssp \
--disable-libgomp --disable-libquadmath \
--disable-target-libiberty --disable-target-zlib \
--enable-languages=c --without-ppl --without-cloog \
--with-mpfr-include=$(pwd)/../gcc-4.6.1/mpfr/src \
--with-mpfr-lib=$(pwd)/mpfr/src/.libs
make
make install
ln -vs libgcc.a `$LFS_TGT-gcc -print-libgcc-file-name | sed
's/libgcc/&_eh/'`
#------------------------------------------------------------------------------



BASH CODE SNIPPET ------------------------------END



I know there is a lot THERE but I hope it helps you out.
NOTE: I had trouble with GMP before - and this CODE has my
fix. I'm referring to how there are tar commands opening files and
moving them
before the GCC actually compiles. 

I HOPE This is helpful somewhat.

--Jason







More information about the lfs-support mailing list