package users: re-adjusting the toolchain

Brandon Peirce brandon_peirce at
Wed Aug 30 08:13:08 PDT 2006

Angel Tsankov wrote:
>>>As what user should I re-adjust the toolchain in Ch. 6 of LFS 6.1.1?
>>"First, backup the /tools linker, and replace it with..."
>>The linker (ld) is part of the binutils package, so the first block of
>>commands (3 mv and 1 ln) should be done as your binutils
>>package user.

For LFS 6.1.1 the instructions says "Install the adjusted linker by running 
the following command from within the binutils-build directory:"
The "make -C ld ... install" command is different to the LFS 6.2
commands but is still manipulating (in 6.1.1 overwriting)
the linker (ld) from the binutils package so it must still be run
as your binutils package user.

>>"Next, amend the GCC specs file so that it points to the new dynamic 
>>linker, ..."
>>The Gcc specs file belongs to GCC, so you run the next block of commands
>>(gcc -dumpspecs | perl....) as your gcc package user.

In 6.1.1 you're still manipulating the same gcc specs file with
an almost identical command, so it must still be run as your
gcc package user.

>>The rest of section 6.10 are just checks. They should ideally be run as a
>>normal user without any privileges, i.e. not root and not a package user.

In 6.1.1 it's section 6.12 which has less thourough checks, but the
same applies.

>I was talking about LFS version 6.1.1 rather than 6.2.

Sorry you did mention that but I clicked my bookmark to the 'stable'
version too quickly.  BTW, I know the commands are sometimes
quite cryptic but if you figure out which file(s) they are manipulating
then you just have to look which user owns the files from that package
and that's the user to use.  The whole principle of the package users
method is that only the user who owns the package has the permissions
to manipulate the files from that package.  (Root has permissions too,
of course, but that's what you are avoiding with package users.)
In most cases, you will get a warning or error message related to
permissions if you use the wrong user.


More information about the lfs-support mailing list