分类: LINUX
2011-08-15 03:14:29
Binutils-2.17
代码:
tar xvf $LFS/binutils-2.17.tar.bz2
mkdir binutils-build
cd binutils-build
../binutils-2.17/configure --prefix=/usr --enable-shared
make tooldir=/usr
make check
这里测试统计可能会出现个别失败。
代码:
make tooldir=/usr install
cp -v ../binutils-2.17/include/libiberty.h /usr/include
cd ..
rm -rf binutils-build
rm -rf binutils-2.17
GCC-4.1.2
代码:
tar xvf $LFS/gcc-4.1.2.tar.bz2
cd gcc-4.1.2
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in
sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in
mkdir -v ../gcc-build
cd ../gcc-build
../gcc-4.1.2/configure --prefix=/usr \
--libexecdir=/usr/lib --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
--enable-clocale=gnu --enable-languages=c,c++
make
make -k check
这里check时间比较长,可能会有一些错误发生
代码:
make install
ln -sv ../usr/bin/cpp /lib
ln -sv gcc /usr/bin/cc
cd ..
rm -rf gcc-build
rm -rf gcc-4.1.2