#### Linux From Scratch - Version 10.1-rc1

### Chapter 6. Cross Compiling Temporary Tools

- Prev

  Xz-5.2.5

- Next

  GCC-10.2.0 - Pass 2

- Up
- Home

# 6.17. Binutils-2.36.1 - Pass 2

The Binutils package contains a linker, an assembler, and other tools for handling object files.

Approximate build time: 1.3 SBU
Required disk space: 517 MB

## 6.17.1. Installation of Binutils

Create a separate build directory again:

    mkdir -v build
    cd       build

Prepare Binutils for compilation:

    ../configure                   \
        --prefix=/usr              \
        --build=$(../config.guess) \
        --host=$LFS_TGT            \
        --disable-nls              \
        --enable-shared            \
        --disable-werror           \
        --enable-64-bit-bfd

The meaning of the new configure options:

`--enable-shared`

  Builds `libbfd` as a shared library.

`--enable-64-bit-bfd`

  Enables 64-bit support (on hosts with narrower word sizes). May not be needed on 64-bit systems, but does no harm.

Compile the package:

    make

Install the package, and workaround an issue causing `libctf.so` to link against zlib from the host distribution:

    make DESTDIR=$LFS install
    install -vm755 libctf/.libs/libctf.so.0.0.0 $LFS/usr/lib

Details on this package are located in Section 8.18.2, “Contents of Binutils.”

- Prev

  Xz-5.2.5

- Next

  GCC-10.2.0 - Pass 2

- Up
- Home