Read everything in LFS book carefully!
Creating the $LFS/tools Directory
All programs compiled in Chapter 5 will be installed under $LFS/tools
to keep them separate from the programs compiled in Chapter 6. ...
Create the required directory by running the following as root:
mkdir -v $LFS/tools
The next step is to create a /tools
symlink on the host system. This
will point to the newly-created directory on the LFS partition. Run
this command as root as well:
ln -sv $LFS/tools /
Introduction
The files compiled in this chapter will be installed under the
$LFS/tools directory to keep them separate from the files installed in
the next chapter and the host production directories. Since the
packages compiled here are temporary, we do not want them to pollute
the soon-to-be LFS system.
Build of binutils (part 1)
Now prepare Binutils for compilation:
../configure --prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
The meaning of the configure options:
--prefix=/tools
This tells the configure script to prepare to install the Binutils programs in the /tools directory.
--with-sysroot=$LFS
For cross compilation, this tells the build system to look in $LFS for the target system libraries as needed.
So if you do everything well (exactly as in LFS book) it should work well :)