Remove libtool archive (.la) files in Chapter 5 and 6

They are really harmful.  In Binutils pass 2, libstdc++.la caused the
building system to use host /usr/lib/libstdc++.so for gprofng.  We now
has disabled gprofng for pass 2, but the similar issue also exists in
GCC pass 2.  In a normal LFS build, the building system silently uses
/usr/lib/libstdc++.so (I guess it does not blow up simply because some
blind luck); in a real cross build (x86 -> ARM for example) the build
will fail.

Remove the .la files to fix this issue.  Instead of only modifying
clfs-ng, it makes more sense to apply the change for trunk: though
the build does not fail, using host library is still a contamination.
This commit is contained in:
Xi Ruoyao
2022-08-19 12:41:48 +08:00
parent d94f2d01a5
commit 6099a47149
5 changed files with 30 additions and 0 deletions

View File

@@ -121,6 +121,11 @@ cd build</userinput></screen>
<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
<para>Remove the libtool archive files because they are harmful for
cross compilation:</para>
<screen><userinput remap="install">rm -v $LFS/usr/lib/lib{stdc++,stdc++fs,supc++}.la</userinput></screen>
</sect2>
<sect2 role="content">