This commit is contained in:
Thomas Trepl 2025-04-24 13:43:45 +02:00
parent d0c2d428e6
commit f15bd6cfff
7 changed files with 49 additions and 23 deletions

View File

@ -294,7 +294,7 @@
<listitem><para></para></listitem> <!-- satisfy build --> <listitem><para></para></listitem> <!-- satisfy build -->
<listitem> <listitem>
<para>Packaging-24.2</para> <para>Packaging-&packaging-version;</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View File

@ -43,21 +43,40 @@
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of Diffutils</title> <title>Installation of Diffutils</title>
<para>When Diffutils is being configured, it checks to see if it is
being cross compiled. If it is, configuration fails. Since we are
cross compiling, comment out the specific lines that perform that
test now:</para>
<screen><userinput remap="pre">sed -e '46252,+3 s/^/#/' \
-e '46596,+3 s/^/#/' \
-i configure</userinput></screen>
<para>Prepare Diffutils for compilation:</para> <para>Prepare Diffutils for compilation:</para>
<screen><userinput remap="configure">./configure --prefix=/usr \ <screen><userinput remap="configure">./configure --prefix=/usr \
--host=$LFS_TGT \ --host=$LFS_TGT \
gl_cv_func_strcasecmp_works=y \
--build=$(./build-aux/config.guess)</userinput></screen> --build=$(./build-aux/config.guess)</userinput></screen>
<variablelist>
<title>The meaning of the configure options:</title>
<varlistentry>
<!-- https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d9083a4cc638cf9c7dfc3cc534a7c6b4debf50ab -->
<term><parameter>gl_cv_func_strcasecmp_works=y</parameter></term>
<listitem>
<para>This option specify the result of a check for the
<function>strcasecmp</function>. The check requires running a
compiled C program, and this is impossible during
cross-compilation because in general a cross-compiled program
cannot run on the host distro. Normally for such a check the
<command>configure</command> script would use a fall-back value
for cross-compilation, but the fall-back value for this check is
absent and the <command>configure</command> script would have no
value to use and error out. The upstream has already fixed the
issue, but to apply the fix we'd need to run
<command>autoconf</command> that the host distro may lack. So
we just specify the check result (<literal>y</literal> as we know
the <function>strcasecmp</function> function in
Glibc-&glibc-version; works fine) instead, then
<command>configure</command> will just use the specified value and
skip the check.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Compile the package:</para> <para>Compile the package:</para>
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>

View File

@ -48,11 +48,9 @@
<screen><userinput remap="make">make</userinput></screen> <screen><userinput remap="make">make</userinput></screen>
<para>The tests are known to fail if running multiple <para>To test the results, issue:</para>
simultaneous tests (-j option greater than 1). To test
the results, issue:</para>
<screen><userinput remap="test">make -j1 check</userinput></screen> <screen><userinput remap="test">make check</userinput></screen>
<para>Install the package:</para> <para>Install the package:</para>

View File

@ -43,7 +43,7 @@
</sect2> </sect2>
<sect2 role="installation"> <sect2 role="installation">
<title>Installation of packaging</title> <title>Installation of Packaging</title>
<para>Compile packaging with the following command:</para> <para>Compile packaging with the following command:</para>

View File

@ -24,10 +24,15 @@
backup of the LFS system in its current state.</para> backup of the LFS system in its current state.</para>
<para>A <command>strip</command> command with the <para>A <command>strip</command> command with the
<parameter>--strip-unneeded</parameter> option removes all debug symbols <parameter>--strip-unneeded</parameter> option removes all debug symbols from
from a binary or library. It also removes all symbol table entries not a binary or library. It also removes all symbol table entries not normally
needed by the linker (for static libraries) or dynamic linker (for needed by the linker (for static libraries) or dynamic linker (for
dynamically linked binaries and shared libraries).</para> dynamically linked binaries and shared libraries). Using
<parameter>--strip-debug</parameter> does not remove symbol table entries
that may be needed by some applications. The difference between "unneeded"
and "debug" is very small. For example, an unstripped libc.a is 22.4 MB.
After stripping with --strip-debug it is 5.9 MB. Using --strip-unneeded only
reduces the size further to only 5.8 MB.</para>
<!-- TODO: Zstd is better than Zlib for both speed and size. <!-- TODO: Zstd is better than Zlib for both speed and size.
Unfortunately Valgrind does not support Zstd-compressed debug Unfortunately Valgrind does not support Zstd-compressed debug
@ -82,7 +87,7 @@ cd /usr/lib
for LIB in $save_usrlib; do for LIB in $save_usrlib; do
objcopy --only-keep-debug --compress-debug-sections=zlib $LIB $LIB.dbg objcopy --only-keep-debug --compress-debug-sections=zlib $LIB $LIB.dbg
cp $LIB /tmp/$LIB cp $LIB /tmp/$LIB
strip --strip-unneeded /tmp/$LIB strip --strip-debug /tmp/$LIB
objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB rm /tmp/$LIB
@ -121,14 +126,14 @@ online_usrlib="libbfd-&binutils-version;.so
for BIN in $online_usrbin; do for BIN in $online_usrbin; do
cp /usr/bin/$BIN /tmp/$BIN cp /usr/bin/$BIN /tmp/$BIN
strip --strip-unneeded /tmp/$BIN strip --strip-debug /tmp/$BIN
install -vm755 /tmp/$BIN /usr/bin install -vm755 /tmp/$BIN /usr/bin
rm /tmp/$BIN rm /tmp/$BIN
done done
for LIB in $online_usrlib; do for LIB in $online_usrlib; do
cp /usr/lib/$LIB /tmp/$LIB cp /usr/lib/$LIB /tmp/$LIB
strip --strip-unneeded /tmp/$LIB strip --strip-debug /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB rm /tmp/$LIB
done</userinput><userinput arch="ml_32,ml_all"> done</userinput><userinput arch="ml_32,ml_all">
@ -151,7 +156,7 @@ for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \
case "$online_usrbin $online_usrlib $save_usrlib" in case "$online_usrbin $online_usrlib $save_usrlib" in
*$(basename $i)* ) *$(basename $i)* )
;; ;;
* ) strip --strip-unneeded $i * ) strip --strip-debug $i
;; ;;
esac esac
done</userinput><userinput arch="ml_32,ml_all"> done</userinput><userinput arch="ml_32,ml_all">

View File

@ -44,7 +44,7 @@
]]> ]]>
<![ %systemd; [ <![ %systemd; [
<!ENTITY version "%relnum;-systemd"> <!ENTITY version "%relnum;-systemd">
<!ENTITY short-version "stable-systemd"> <!-- Used below in &blfs-book; --> <!ENTITY short-version "%relnum;-systemd"> <!-- Used below in &blfs-book; -->
]]> ]]>
<!ENTITY errata "&lfs-root;lfs/errata/&version;/"> <!ENTITY errata "&lfs-root;lfs/errata/&version;/">
<!ENTITY generic-version "%relnum;"> <!-- Used below in <!ENTITY generic-version "%relnum;"> <!-- Used below in

View File

@ -139,6 +139,7 @@ if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current";
if ( $package == "ncurses" ) $dirpath = "https://invisible-mirror.net/archives/ncurses"; if ( $package == "ncurses" ) $dirpath = "https://invisible-mirror.net/archives/ncurses";
if ( $package == "ninja" ) $dirpath = github("ninja-build/ninja"); if ( $package == "ninja" ) $dirpath = github("ninja-build/ninja");
if ( $package == "openssl" ) $dirpath = github("openssl/openssl"); if ( $package == "openssl" ) $dirpath = github("openssl/openssl");
if ( $package == "packaging" ) $dirpath = "https://pypi.org/rss/project/packaging/releases.xml";
if ( $package == "procps-ng" ) $dirpath = "https://gitlab.com/procps-ng/procps/-/tags"; if ( $package == "procps-ng" ) $dirpath = "https://gitlab.com/procps-ng/procps/-/tags";
if ( $package == "psmisc" ) $dirpath = "https://gitlab.com/psmisc/psmisc/-/tags"; if ( $package == "psmisc" ) $dirpath = "https://gitlab.com/psmisc/psmisc/-/tags";
if ( $package == "Python" ) $dirpath = "https://www.python.org/downloads/source/"; if ( $package == "Python" ) $dirpath = "https://www.python.org/downloads/source/";
@ -262,6 +263,9 @@ if ( $package == "zstd" ) $dirpath = github("facebook/zstd");
return find_max( $lines, "/wheel\/\d/", "/^.*wheel\/([\d\.]+).*$/" ); return find_max( $lines, "/wheel\/\d/", "/^.*wheel\/([\d\.]+).*$/" );
# End Python modules # End Python modules
if ( $package == "packaging" )
return find_max( $lines, "/packaging/", "/^.*^.*packaging.([\d\.]+\d)\/.*$/" );
if ( $package == "procps-ng" ) if ( $package == "procps-ng" )
return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" );