I’m learning linux knowledges, when I compile binutils or gcc and install them, they always appear in two locations.
I think it must be a reason and I don’t know why?
Actually I’m learning lfs. When I compile the pass I of binutils, the book’s instructions is:
../binutils-2.22/configure \
--prefix=/tools \
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
--target=$LFS_TGT \
--disable-nls \
--disable-werror
After I make && make install, it is installed in two locations: /tools/bin and /tools/$LFS_TGT/bin.
I want to why and the purpose of doing that.
Essentially, the binary that is in
/tools/$LFS_TGT/binis the version of the tool that is specifically built for that particular$LFS_TGT. A second copy is placed in/tools/$LFS_TGT, because the tool is intended to replace the one that is already present there because you told it to do that using the--with-sysrootoption