|
|
发表于 2006-8-26 08:26:22
|
显示全部楼层
Post by 终极幻想
也许一直都在改进,所以就算是某些补丁也不会妨碍 LFS 的编译了。 这方面是可以肯定的,我们可以从编译 ToolChain (Binutils/GCC/Glibc) 的说明看出来,现在让我们重温一下几个 LFS 版本的手册吧
在 LFS-5.1.1 的 BOOK,非常强调不要使用任何 GCC 的优化參数,尽管只是 -march 或 -mcpu 之类,编译前应该 unset CFLAGS 及 CXXFLAGS
Binutils-2.14 - Pass 1
The Binutils package contains a linker, an assembler, and other tools for handling object files.
Approximate build time: 1.0 SBU
Required disk space: 170 MB
Binutils installation depends on: Bash, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep, Make, Perl, Sed, Texinfo.
Installation of Binutils
It is important that Binutils be the first package to get compiled, because both Glibc and GCC perform various tests on the available linker and assembler to determine which of their own features to enable.
[color="Red"]This package is known to behave badly when you change its default optimization flags (including the -march and -mcpu options). Therefore, if you have defined any environment variables that override default optimizations, such as CFLAGS and CXXFLAGS, we recommend un-setting them when building Binutils.
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory:
mkdir ../binutils-build
cd ../binutils-build
LFS-6.1 的 BOOK,说气开始软化了,不再是 "known to behave badly" 改以 "known to have issues" 代之,仍建议 unset CFLAGS 及 CXXFLAGS
5.3. Binutils-2.15.94.0.2.2 - Pass 1
The Binutils package contains a linker, an assembler, and other tools for handling object files.
Approximate build time: 1.0 SBU
Required disk space: 170 MB
Installation depends on: Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext, Glibc, Grep, M4, Make, Perl,
Sed, and Texinfo
5.3.1. Installation of Binutils
It is important that Binutils be the first package compiled because both Glibc and GCC perform various tests on
the available linker and assembler to determine which of their own features to enable.
[color="Red"]This package is known to have issues when its default optimization flags (including the -march and -mcpu
options) are changed. If any environment variables that override default optimizations have been defined, such
as CFLAGS and CXXFLAGS, unset them when building Binutils.
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build
directory:
mkdir ../binutils-build
cd ../binutils-build
LFS-6.1.1 的 BOOK,跟 6.1 是一致的,但加入 gcc-4.x 的补丁,改善高版 gcc 的编译问题
5.3. Binutils-2.15.94.0.2.2 - Pass 1
The Binutils package contains a linker, an assembler, and other tools for handling object files.
Approximate build time: 1.0 SBU
Required disk space: 179 MB
Installation depends on: Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext, Glibc, Grep, M4, Make, Perl, Sed, and Texinfo
5.3.1. Installation of Binutils
It is important that Binutils be the first package compiled because both Glibc and GCC perform various tests on the available linker and assembler to determine which of their own features to enable.
[color="Red"]This package is known to have issues when its default optimization flags (including the -march and -mcpu options) are changed. If any environment variables that override default optimizations have been defined, such as CFLAGS and CXXFLAGS, unset them when building Binutils.
If you are building from a host running Gcc-4 or later, it is necessary to patch the first build of this version of Binutils so that it can be compiled by the host system.
[color="Red"]patch -Np1 -i ../binutils-2.15.94.0.2.2-gcc4-1.patch
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory:
mkdir -v ../binutils-build
cd ../binutils-build
这是 LFS-6.2 的 BOOK,已不再提及 CFLAGS 的问题了,其实我上次用 jhalfs 自动脚本做 LFS-6.2-pre 的 SVN 版的时候跟本就没有 unset 过 CFLAGS,ToolChain 全带 CFLAGS 下编译也能顺利完成,在 BLFS 上现在也未见异常
5.3. Binutils-2.16.1 - Pass 1
The Binutils package contains a linker, an assembler, and other tools for handling object files.
Approximate build time: 1 SBU
Required disk space: 189 MB
5.3.1. Installation of Binutils
It is important that Binutils be the first package compiled because both Glibc and GCC perform various tests on the available linker and assembler to determine which of their own features to enable.
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory:
mkdir -v ../binutils-build
cd ../binutils-build
可见,软件是不断在改进的。。。 |
|