5.6. Installing Binutils-2.13

Estimated build time:           2.05 SBU
Estimated required disk space:  160 MB

5.6.1. Installation of Binutils

This package is known to behave badly when you have changed its default optimization flags (including the -march and -mcpu options). Binutils is best left alone. Therefore, if you have defined any environment variables that override default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting or modifying them when building binutils. You have been warned.

Install Binutils by running the following commands:

mkdir ../binutils-build &&
cd ../binutils-build &&
../binutils-2.13/configure --prefix=$LFS/static --disable-nls &&
make LDFLAGS=-all-static &&
make install

5.6.2. Command explanations

mkdir ../binutils-build: The installation instructions for Binutils recommend creating a separate build directory instead of compiling the package inside the source tree. So, we create a binutils-build directory and work from there.

--disable-nls: This option disables internationalization (also known as i18n). We don't need this for our static programs and nls often causes problems when you're linking statically.

LDFLAGS=-all-static: Setting the variable LDFLAGS to the value -all-static causes binutils to be linked statically.

5.6.3. Contents of Binutils

Last checked against version 2.12.1.

5.6.3.2. Descriptions

5.6.4. Binutils Installation Dependencies

Last checked against version 2.11.2.

Autoconf: autoconf, autoheader
Automake: aclocal, automake
Bash: sh
Binutils: ar, as, ld, nm, ranlib, strip
Diffutils: cmp
Fileutils: chmod, cp, ln, ls, mkdir, mv, rm, rmdir, touch
Flex: flex
Gcc: cc, cc1, collect2, cpp0, gcc
Glibc: ldconfig
Grep: egrep, fgrep, grep
M4: m4
Make: make
Gawk: gawk
Sed: sed
Sh-utils: basename, echo, expr, hostname, sleep, true, uname
Texinfo: install-info, makeinfo
Textutils: cat, sort, tr, uniq