LFS 学习日记(第五章构建临时系统之5.9. Binutils-2.20第二遍)

2010年06月25日 星期五
http://www.linuxfromscratch.org/lfs/view/6.6/chapter05/binutils-pass2.html
5.9. Binutils-2.20 - Pass 2

CC="$LFS_TGT-gcc -B/tools/lib/" \
   AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \
   ../binutils-2.20/configure --prefix=/tools \
   --disable-nls --with-lib-path=/tools/lib

question: 从 ./configure --help 看不到 --disable-nls 和 --with-lib-path 的选项,这是从哪里来的?

translation: http://www.linuxfromscratch.org/lfs/view/6.6/chapter05/binutils-pass1.html
In order for the SBU values listed in the rest of the book to be of any use, measure the time it takes to build this package from the configuration, up to and including the first install.

为了这本书余下部分列出的 SBU 值有用,测量从配置直到并包括第一次安装所用的编译这个软件包的时间。

to be of any use: http://www.nciku.cn/search/en/detail/be%20of%20use/2601051
be of use

       1. 1. 有用,起作用

          Not all of the information from the outdated book can be of use.
              并不是所用从这本已经过时的书本里找到的信息都能派上用场。

The knife was too dull to be of any use.
    这把刀子太钝,没什么用处。

question: Because this is really a native build of Binutils 这次是本地而不是交叉编译,所以没有指定 --build --host --target 任何一个参数,但是为什么这次不用交叉编译呢?这次编译有什么作用?

make -C ld LIB_PATH=/usr/lib:/lib
Specifying the LIB_PATH Makefile variable on the command line allows us to override the default value of the temporary tools and point it to the proper final path.
已经在前面的 ./configure 中已经指定了默认的 --with-lib-path=/tools/lib ,这里在make的命令行中重新指定了这个值。

todo: Makefile 文件变量的使用和 make 命令行的参数传递

lfs:/mnt/lfs/sources/binutils-build$ time { CC="$LFS_TGT-gcc -B/tools/lib/"    AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib    ../binutils-2.20/configure --prefix=/tools    --disable-nls --with-lib-path=/tools/lib && make && make install; }

real    1m25.093s
user    1m10.356s
sys    1m22.093s

大概看了一下安装的文件(用 find ./ -amin -20 查找),主要是./bin ./include ./lib 新增(也许还有改变)了一些文件,像as, ar, ld 等 binutils 主要命令都有安装在 ./bin 下面,另外,新增加了一个 与原来 ./i686-lfs-linux-gnu 目录并列的 ./i686-pc-linux-gnu 的目录及里面的相应东西。