On 2020-02-21 01:54 +0100, Tadeus Prastowo via lfs-dev wrote:
> Hello,
> 
> To quote 
> http://www.linuxfromscratch.org/lfs/view/development/chapter05/binutils-pass2.html
> :
> 
> --with-sysroot
> The sysroot feature enables the linker to find shared objects which
> are required by other shared objects explicitly included on the
> linker's command line. Without this, some packages may not build
> successfully on some hosts.
> 
> End quote.
> 
> As described in another e-mail at
> http://lists.linuxfromscratch.org/pipermail/lfs-dev/2020-February/073506.html,
> the `--with-sysroot' option used to configure the second binutils will
> refer to a non-existent directory, such as
> /LFS-tools/x86_64-pc-linux-gnu/sys-root/.  In other words, it cannot
> be the case that the linker (ld) will "find shared objects which are
> required by other shared objects explicitly included on the linker's
> command line" in the non-existent directory.  While it is true that
> "without this, some packages may not build successfully on some hosts"
> (e.g., the first build of Perl), the description of the
> `--with-sysroot' can be improved as follows:
> 
> This option will prevent the linker from looking in the default places
> in the build system (e.g., by reading the file /etc/ld.so.conf) by
> forcing the linker to look only in places within the non-existent
> default sysroot directory /tools/$LFS_TGT/sys-root.  If this option is
> not given and the linker reads some working ld.so.conf of the build
> system, the linker will produce objects that are linked to the build
> system's library, not to the libraries built within the /tools
> directory, which defeats the effort of having a clean build.
> 
> What do you think?  Thanks.

I agree.  This also confused me when I was doing the Chinese translation.
-- 
Xi Ruoyao <xry...@mengyan1223.wang>
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

Reply via email to