LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: qufo

[完成]直播,LFS 6.4 rc1 2nd

[复制链接]
 楼主| 发表于 2008-11-16 10:39:00 | 显示全部楼层

5.8. Adjusting the Toolchain

这个没什么可说的,该交待的,handbook都说清楚了.

  1. mv -v /tools/bin/{ld,ld-old}
  2. mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
  3. mv -v /tools/bin/{ld-new,ld}
  4. ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
  5. gcc -dumpspecs | sed 's@/lib/ld-linux.so.2@/tools&@g' \
  6.   > `dirname $(gcc -print-libgcc-file-name)`/specs
  7. GCC_FIXED=`dirname $(gcc -print-libgcc-file-name)`/include-fixed &&
  8. find ${GCC_FIXED}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &&
  9. rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_FIXED}/*` &&
  10. unset GCC_FIXED
复制代码

完成了之后进行一次测试,
那个测试还是做吧,得不到正确结果就不用做下去了.
回复 支持 反对

使用道具 举报

发表于 2008-11-16 10:46:59 | 显示全部楼层
这个测试是一定要做的
工具链没有调整好是不能继续下去的
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 11:20:22 | 显示全部楼层

5.9. Tcl-8.5.5

为了做 make check ,决定安装三个用于check的包.

  1. cd $LFS/sources
  2. tar xvf /sou/tcl8.5.5-src.tar.gz
  3. cd tcl8.5.5
  4. cd unix
  5. ./configure --prefix=/tools
  6. make
  7. TZ=UTC make test  
  8. make install
  9. chmod -v u+w /tools/lib/libtcl8.5.so
  10. make install-private-headers
  11. ln -sv tclsh8.5 /tools/bin/tclsh
复制代码

make test 的时候出现3个fail
不管了.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 11:33:21 | 显示全部楼层

5.10. Expect-5.43.0

Alert: Version 5.44 of Expect has been recalled due to unresolved problems. Please use 5.43.0. All links below point to 5.43.0 - Don

所以,还是乖乖用 5.43
需要打两个补丁

  1. cd $LFS/sources
  2. tar xvf /sou/expect-5.43.0.tar.gz
  3. cd expect-5.43
  4. patch -Np1 -i /sou/expect-5.43.0-spawn-1.patch
  5. patch -Np1 -i /sou/expect-5.43.0-tcl_8.5.4_fix-1.patch
  6. cp -v configure{,.orig}
  7. sed 's:/usr/local/bin:/bin:' configure.orig > configure
  8. ./configure --prefix=/tools --with-tcl=/tools/lib \
  9.   --with-tclinclude=/tools/include --with-x=no
  10. make
  11. make test
  12. make SCRIPTS="" install
复制代码

完成.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 11:35:30 | 显示全部楼层

5.11. DejaGNU-1.4.4


  1. cd $LFS/sources
  2. tar xvf /sou/dejagnu-1.4.4.tar.gz
  3. cd dejagnu-1.4.4
  4. ./configure --prefix=/tools
  5. make install
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 13:08:20 | 显示全部楼层

5.12. GCC-4.3.2 - Pass 2

按照handbook


  1. cd $LFS/sources
  2. tar /sou/gcc-4.3.2.tar.bz2
  3. cd gcc-4.3.2
  4. cp -v gcc/Makefile.in{,.orig}
  5. sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig > gcc/Makefile.in
  6. cp -v gcc/Makefile.in{,.tmp}
  7. sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \
  8.   > gcc/Makefile.in
  9. for file in $(find gcc/config -name linux64.h -o -name linux.h)
  10. do
  11.   cp -uv $file{,.orig}
  12.   sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
  13.   -e 's@/usr@/tools@g' $file.orig > $file
  14.   echo "
  15. #undef STANDARD_INCLUDE_DIR
  16. #define STANDARD_INCLUDE_DIR 0" >> $file
  17.   touch $file.orig
  18. done
  19. tar xvf /sou/mpfr-2.3.2.tar.bz2
  20. mv mpfr-2.3.2 mpfr
  21. tar xvf /sou/gmp-4.2.4.tar.bz2
  22. mv gmp-4.2.4 gmp
  23. mkdir -v ../gcc-build
  24. cd ../gcc-build
  25. ../gcc-4.3.2/configure --prefix=/tools \
  26.     --with-local-prefix=/tools --enable-clocale=gnu \
  27.     --enable-shared --enable-threads=posix \
  28.     --enable-__cxa_atexit --enable-languages=c,c++ \
  29.     --disable-libstdcxx-pch --disable-bootstrap
  30. make
  31. make -k check
  32. make install
复制代码


完了照handbook再来一次测试.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 14:07:28 | 显示全部楼层

5.13. Binutils-2.18 - Pass 2

handbook是2.19,此处采用2.19

handbook 上说
Binutils does not recognize versions of Texinfo newer than 4.9. Fix this issue by applying the following patch:


但我的是2.19,所以不打补丁,再说,我也没找到2.19相关的补丁.


  1. cd $LFS/sources
  2. tar xvf /sou/binutuils-2.19.tar.bz2
  3. mkdir binutils-build
  4. cd binutils-build
  5. ../binutils-2.19/configure --prefix=/tools \
  6.     --disable-nls --with-lib-path=/tools/lib
  7. make
  8. make install
  9. make -C ld clean
  10. make -C ld LIB_PATH=/usr/lib:/lib
  11. cp -v ld/ld-new /tools/bin
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 20:18:26 | 显示全部楼层

5.14. Ncurses-5.6

下午去了拿驾照,C1的,从此一个崭新的马路杀手诞生了.

现在,接着.


  1. cd $LFS/sources
  2. tar xvf ncurses-5.6.tar.gz
  3. cd ncurses-5.6
  4. ./configure --prefix=/tools --with-shared \
  5.     --without-debug --without-ada --enable-overwrite
  6. make
  7. make install
  8. cd ..
  9. rm -rf ncurses-5.6
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 20:29:44 | 显示全部楼层

5.15. Bash-3.2

无话,上代码.

  1. cd $LFS/sources
  2. tar xvf /sou/bash-3.2.tar.gz
  3. cd bash-3.2
  4. patch -Np1 -i ../bash-3.2-fixes-8.patch
  5. ./configure --prefix=/tools --without-bash-malloc \
  6.    ac_cv_func_working_mktime=yes
  7. make
  8. make install
  9. ln -vs bash /tools/bin/sh
复制代码

这里又出现了这个打补丁的家伙.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-11-16 21:29:21 | 显示全部楼层

5.16. Bzip2-1.0.5


  1. cd $LFS/sources
  2. tar xvf bzip2-1.0.5.tar.gz
  3. cd bzip2-1.0.5
  4. make
  5. make PREFIX=/tools install
  6. cd ..
  7. rm -rf bzip2-1.0.5
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表