It is no longer needed, we should already have all the libs we actually
need present in the targetfs/lib/ directory as we've been installing
them as we go.
So that we have headers and libs all provided in the cross tools to
enable compiling things that use zlib but also so we have the runtime
shared object in the targetfs.
In order to be consistent with later parts of the book which do use
'sudo' in the commands given, use 'sudo' here, too, as we need root
permissions usually to create a directory in /mnt/.
As pointed out by akhiezer <lfs65@cruziero.com>, the BASEDIR variable
doesn't actually exist and the way it is used in the
documentation/comments means it is actually referring to the RENDERDIR
variable.
Thanks to akhiezer <lfs65@cruziero.com> for pointing out that this was
unclearly referring to a --host= when we simply rely on the inferred
finding for --host= and --build= as both will be the host machine.
Clarify that the host needs be able to run depmod and then when
installing depmod to cross-tools, use verbose options so we get a nice
printout of what's done like every other time we use cp or chmod.
This tells make to set these internal to it variables rather than having
the shell set the variables and then launch make. This is slightly
safer and works correctly.
There is a description of the permissions set for /var/tmp but it is not
actually created, nor does it have its permissions set to match the
description. Fix this so that the actions match the description.
Thanks to akhiezer <lfs65@cruziero.com> for pointing this out.
This time it installs into the targetfs sysroot, as we've told the
compiler and linker to use the targetfs sysroot for their header and
library search needs.
This allows the compiler and linker to use the targetfs directory
structure as the sysroot for compiling but will mean that we have to
build musl one more time in the final-system chapter.
Do this before we set the toolchain variables for the clfs user in their
.bashrc file so that we can pass the "--sysroot=" option to use this
targetfs dir as the root file system for compiling.
We will need to install musl into the targetfs in a future commit.
As reported by selk on IRC.
Without setting the CROSS_COMPILE variable, potentially the host's
binutils may be used. Usage of CC is also needed, so is kept.