aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-02-03 09:25:21 +0000
committerXi Ruoyao <xry111@mengyan1223.wang>2021-02-03 09:25:21 +0000
commitcd152f22770796527d3203b4b0b85abef43e018f (patch)
tree5b71c74520ae1f2bd8140c6694d88c115e63d054
parent1f460e53b4186579f9ec20622356910580663ab3 (diff)
remove unneeded static libraries
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@12122 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--chapter08/binutils.xml6
-rw-r--r--chapter08/bzip2.xml6
-rw-r--r--chapter08/e2fsprogs.xml5
-rw-r--r--chapter08/flex.xml5
-rw-r--r--chapter08/libtool.xml7
-rw-r--r--chapter08/ncurses.xml9
-rw-r--r--chapter08/revisedchroot.xml13
-rw-r--r--chapter08/zlib.xml6
8 files changed, 31 insertions, 26 deletions
diff --git a/chapter08/binutils.xml b/chapter08/binutils.xml
index 3930090d0..a8f0f9802 100644
--- a/chapter08/binutils.xml
+++ b/chapter08/binutils.xml
@@ -163,6 +163,10 @@ cd build</userinput></screen>
<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
+ <para>Remove useless static libraries:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a</userinput></screen>
+
</sect2>
<sect2 id="contents-binutils" role="content">
@@ -176,7 +180,7 @@ cd build</userinput></screen>
<seglistitem>
<seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm,
objcopy, objdump, ranlib, readelf, size, strings, and strip</seg>
- <seg>libbfd.{a,so}, libctf.{a,so}, libctf-nobfd.{a,so}, and libopcodes.{a,so}</seg>
+ <seg>libbfd.so, libctf.so, libctf-nobfd.so, and libopcodes.so</seg>
<seg>/usr/lib/ldscripts</seg>
</seglistitem>
</segmentedlist>
diff --git a/chapter08/bzip2.xml b/chapter08/bzip2.xml
index e2ff5108f..bc38c6023 100644
--- a/chapter08/bzip2.xml
+++ b/chapter08/bzip2.xml
@@ -95,6 +95,10 @@ rm -v /usr/bin/{bunzip2,bzcat,bzip2}
ln -sv bzip2 /bin/bunzip2
ln -sv bzip2 /bin/bzcat</userinput></screen>
+ <para>Remove an useless static library:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libz.a</userinput></screen>
+
</sect2>
<sect2 id="contents-bzip2" role="content">
@@ -109,7 +113,7 @@ ln -sv bzip2 /bin/bzcat</userinput></screen>
<seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
- <seg>libbz2.{a,so}</seg>
+ <seg>libbz2.so</seg>
<seg>/usr/share/doc/bzip2-&bzip2-version;</seg>
</seglistitem>
</segmentedlist>
diff --git a/chapter08/e2fsprogs.xml b/chapter08/e2fsprogs.xml
index 65d8604cd..fc6f897f5 100644
--- a/chapter08/e2fsprogs.xml
+++ b/chapter08/e2fsprogs.xml
@@ -122,10 +122,9 @@ cd build</userinput></screen>
<screen><userinput remap="install">make install</userinput></screen>
- <para>Make the installed static libraries writable so debugging symbols can
- be removed later:</para>
+ <para>Remove useless static libraries:</para>
-<screen><userinput remap="install">chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen>
+<screen><userinput remap="install">rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen>
<para>This package installs a gzipped
<filename class="extension">.info</filename> file but doesn't update the
diff --git a/chapter08/flex.xml b/chapter08/flex.xml
index fc8574c1d..d05474f03 100644
--- a/chapter08/flex.xml
+++ b/chapter08/flex.xml
@@ -53,8 +53,9 @@
<para>Prepare Flex for compilation:</para>
-<!-- <screen><userinput remap="configure">HELP2MAN=/tools/bin/true \ -->
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr \
+ --docdir=/usr/share/doc/flex-&flex-version; \
+ --disable-static</userinput></screen>
<para>Compile the package:</para>
diff --git a/chapter08/libtool.xml b/chapter08/libtool.xml
index affeaca95..a2abdbe70 100644
--- a/chapter08/libtool.xml
+++ b/chapter08/libtool.xml
@@ -68,6 +68,13 @@
<screen><userinput remap="install">make install</userinput></screen>
+ <!-- dev: - -disable-static works but causes additional test failures
+ so we manually remove the static library -->
+
+ <para>Remove an useless static library:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libltdl.a</userinput></screen>
+
</sect2>
diff --git a/chapter08/ncurses.xml b/chapter08/ncurses.xml
index d0036c7de..53527003d 100644
--- a/chapter08/ncurses.xml
+++ b/chapter08/ncurses.xml
@@ -41,10 +41,6 @@
<sect2 role="installation">
<title>Installation of Ncurses</title>
- <para>Don't install a static library that is not handled by configure:</para>
-
-<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
-
<para>Prepare Ncurses for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \
@@ -133,6 +129,10 @@ done</userinput></screen>
echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
+ <para>Remove a static library that is not handled by configure:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libncurses++w.a</userinput></screen>
+
<para>If desired, install the Ncurses documentation:</para>
<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version;
@@ -188,7 +188,6 @@ cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
libformw.so,
libmenuw.so,
libncursesw.so,
- libncurses++w.a,
libpanelw.so, and their non-wide-character counterparts without "w"
in the library names.</seg>
<seg>
diff --git a/chapter08/revisedchroot.xml b/chapter08/revisedchroot.xml
index 725c76170..3a2defb07 100644
--- a/chapter08/revisedchroot.xml
+++ b/chapter08/revisedchroot.xml
@@ -36,19 +36,6 @@ chroot "$LFS" /usr/bin/env -i \
linkend="ch-tools-bindmount"/> and <xref
linkend="ch-tools-kernfsmount"/>.</para>
- <para>There were several static libraries that were not suppressed earlier
- in the chapter in order to satisfy the regression tests in several packages. These
- libraries are from binutils, bzip2, e2fsprogs, flex, libtool, and zlib. If desired,
- remove them now:</para>
-
-<screen><userinput>rm -f /usr/lib/lib{bfd,opcodes}.a
-rm -f /usr/lib/libctf{,-nobfd}.a
-rm -f /usr/lib/libbz2.a
-rm -f /usr/lib/lib{com_err,e2p,ext2fs,ss}.a
-rm -f /usr/lib/libltdl.a
-rm -f /usr/lib/libfl.a
-rm -f /usr/lib/libz.a</userinput></screen>
-
<para>There are also several files installed in the /usr/lib and /usr/libexec
directories with a file name extension of .la. These are "libtool archive"
files. As already said, they are only useful when linking with static
diff --git a/chapter08/zlib.xml b/chapter08/zlib.xml
index 90c343ca5..f00988468 100644
--- a/chapter08/zlib.xml
+++ b/chapter08/zlib.xml
@@ -65,6 +65,10 @@
<screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen>
+ <para>Remove an useless static library:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libz.a</userinput></screen>
+
</sect2>
<sect2 id="contents-zlib" role="content">
@@ -74,7 +78,7 @@ ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></scr
<segtitle>Installed libraries</segtitle>
<seglistitem>
- <seg>libz.{a,so}</seg>
+ <seg>libz.so</seg>
</seglistitem>
</segmentedlist>