On 2020-04-07 21:37 -1000, Dean Takemori via lfs-dev wrote: > For x86_64 builds, LFS patches gcc to set the default directory name for 64- > bit libraries to “lib” instead of “lib64” (eg in chapter 5.5.1, 5.10.1 and > 6.25.1) by patching gcc/config/i386/t-linux64 > > But the location of the dynamic linker is left in /lib64, meaning a “stub > directory” /lib64 ends up being created and then a compatibility symlink added > in chapter 6.9.1 > > > Is there any reason to not additionally patch gcc and glibc to have the > x86-64 > dynamic linker reside in /lib?
Short answer: don't do that. Long answer: the full path to the ELF interpreter is hardcoded in every ELF executables. If we use a path different to other distros, we can't run the executables compiled in our system on other distros, vice versa. So the path have to be specified in a standard, which is Linux Standard Base. LSB 2.0.0 mandates to use /lib64/ld-linux-x86-64.so.2 on AMD64. And LSB 3.0.0+ mandates to use /lib64/ld-lsb-x86-64.so.3. If you don't care LSB or compatibility with other distros, you can do whatever you want (your distro, your rules). But we can't do it in the book. -- Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
