diff options
author | Xi Ruoyao <xry111@xry111.site> | 2022-08-19 12:41:48 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2022-08-19 12:41:48 +0800 |
commit | 6099a4714944f72636abb2cc5b31aead091bd9c5 (patch) | |
tree | 3f1f43daf905d1d2978ce99257a50aa445a84364 /chapter06 | |
parent | d94f2d01a50466c98eaf92fc4e7c2ced50fdd91a (diff) |
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.
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/binutils-pass2.xml | 5 | ||||
-rw-r--r-- | chapter06/file.xml | 5 | ||||
-rw-r--r-- | chapter06/xz.xml | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml index 1cabf96d9..8766b71e9 100644 --- a/chapter06/binutils-pass2.xml +++ b/chapter06/binutils-pass2.xml @@ -98,6 +98,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, and remove unnecessary static libraries:</para> + +<screen><userinput remap="install">rm -v $LFS/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.{a,la}</userinput></screen> + </sect2> <sect2 role="content"> diff --git a/chapter06/file.xml b/chapter06/file.xml index 880817509..19d5ae369 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -90,6 +90,11 @@ popd</userinput></screen> <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + <para>Remove the libtool archive file because it is harmful for cross + compilation:</para> + +<screen><userinput remap="install">rm -v $LFS/usr/lib/libmagic.la</userinput></screen> + </sect2> <sect2 role="content"> diff --git a/chapter06/xz.xml b/chapter06/xz.xml index e277f9517..78fa7d4f3 100644 --- a/chapter06/xz.xml +++ b/chapter06/xz.xml @@ -59,6 +59,11 @@ <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + <para>Remove the libtool archive file because it is harmful for cross + compilation:</para> + +<screen><userinput remap="install">rm -v $LFS/usr/lib/liblzma.la</userinput></screen> + </sect2> <sect2 role="content"> |