strip: restore versions in online_usrlib and save_usrlib

Without them, for example:

    cp /usr/lib/libbfd.so /tmp/libbfd.so
    # now /tmp/libbfd.so is a hardcopy of /usr/lib/libbfd-2.37.so
    strip --strip-unneeded /tmp/libbfd.so
    install -vm755 /tmp/libbfd.so /usr/lib/libbfd.so
    # now /usr/lib/libbfd.so is *not* a symlink, but a real file

We don't want this to happen.

libdl and libpthread removed: they are now dummy libs and is not used by
anything built in LFS/BLFS.
This commit is contained in:
Xi Ruoyao 2021-08-03 23:58:46 +08:00
parent 2cc15c335f
commit 6094daeb7a
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC

View File

@ -43,12 +43,11 @@
<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
<screen><userinput>save_usrlib="ld-linux-x86-64.so.2
<screen><userinput>save_usrlib="ld-linux-x86-64.so.2
libc.so.6
libpthread.so.6
libthread_db.so
libthread_db.so.1
libquadmath.so.&libquadmath-version;
libstdc++.so.6
libstdc++.so.&libstdcpp-version;
libitm.so.&libitm-version;
libatomic.so.&libatomic-version;"
@ -64,13 +63,12 @@ for LIB in $save_usrlib; do
done
online_usrbin="bash find strip"
online_usrlib="libbfd.so
libdl.so.2
libhistory.so
libncursesw.so
libm.so.6
libreadline.so
libz.so
online_usrlib="libbfd-&binutils-version;.so
libhistory.so.&readline-version;
libncursesw.so.&ncurses-version;
libm.so.6
libreadline.so.&readline-version;
libz.so.&zlib-version;
$(cd /usr/lib; find libnss*.so* -type f)"
for BIN in $online_usrbin; do