Binutils-2.21 - Faas 2

Allikas: Kuutõrvaja

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

Binutils pakett sisaldab linkerit, assemblerit ja teisi objekt failide haldamise töövahendeid.

Umbkaudne ehitamise aeg: 1.3 SBU Vajaminev kettaruum: 259 MB

5.9.1. Binutilsi paigaldamine

Create a separate build directory again:

Loome eraldatud kompileerimise kataloogi:

mkdir -v ../binutils-build
cd ../binutils-build

Valmistame Binutilsi kompileerimiseks ette:

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

Konfigureerimise võtmete tähendus:

  • CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib

Because this is really a native build of Binutils, setting these variables ensures that the build system uses the cross-compiler and associated tools instead of the ones on the host system.

  • --with-lib-path=/tools/lib

This tells the configure script to specify the library search path during the compilation of Binutils, resulting in /tools/lib being passed to the linker. This prevents the linker from searching through library directories on the host.

Kompileerime paketi:


Paigaldame paketi:

make install

Now prepare the linker for the “Re-adjusting” phase in the next chapter:

make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
cp -v ld/ld-new /tools/bin

Make parameetrite tähendused:

  • -C ld clean

This tells the make program to remove all compiled files in the ld subdirectory.

  • -C ld LIB_PATH=/usr/lib:/lib

This option rebuilds everything in the ld subdirectory. 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. The value of this variable specifies the linker's default library search path. This preparation is used in the next chapter.

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