From bd5b888ad374c5cf1a3b4a1fd82ee8d34765444f Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Thu, 27 Apr 2023 10:01:17 -0500 Subject: [PATCH 01/22] Create new branch for gcc13 --- chapter01/changelog.xml | 22 ++++++++++++++++++++++ chapter01/whatsnew.xml | 12 ++++++------ chapter05/gcc-pass1.xml | 2 +- chapter05/glibc.xml | 4 ++-- chapter06/coreutils.xml | 2 ++ chapter08/coreutils.xml | 3 ++- chapter08/gcc.xml | 1 + packages.ent | 30 +++++++++++++++--------------- 8 files changed, 51 insertions(+), 25 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 69858bd96..039eeff3f 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,28 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2023-04-30 + + + [bdubbs] - Update to gcc-13.1.0. Fixes + #5247. + + + [bdubbs] - Update to perl-5.36.1. Fixes + #5246. + + + [bdubbs] - Update to linux-6.3. Fixes + #5245. + + + [bdubbs] - Update to coreutils-9.3. Fixes + #5244. + + + + 2023-04-15 diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 20cd8dfe2..91c1846d6 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -64,9 +64,9 @@ - + @@ -100,9 +100,9 @@ - + @@ -211,9 +211,9 @@ - + diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 82efcd617..8ca2e92b5 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -218,7 +218,7 @@ cd build cd .. cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ - `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h + `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include/limits.h diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 6b78031bc..66526ba4c 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -222,13 +222,13 @@ readelf -l a.out | grep ld-linux package, especially Binutils-pass2 or GCC-pass2, fails to build, it is an indication that something has gone wrong with the preceding Binutils, GCC, or Glibc installations. - + diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 33f53ec1e..207e05dc5 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -43,6 +43,8 @@ Installation of Coreutils +export gl_cv_macro_MB_CUR_MAX_good=y + Prepare Coreutils for compilation: ./configure --prefix=/usr \ diff --git a/chapter08/coreutils.xml b/chapter08/coreutils.xml index 7c528d6c4..c72041b3b 100644 --- a/chapter08/coreutils.xml +++ b/chapter08/coreutils.xml @@ -54,11 +54,12 @@ + Now prepare Coreutils for compilation: autoreconf -fiv diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 4b5c2dd61..546ad6b1a 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -78,6 +78,7 @@ cd build --enable-default-ssp \ --disable-multilib \ --disable-bootstrap \ + --disable-fixinclude \ --with-system-zlib GCC supports seven different computer languages, but the diff --git a/packages.ent b/packages.ent index 52ce4c4cf..d134cf075 100644 --- a/packages.ent +++ b/packages.ent @@ -104,10 +104,10 @@ - - + + - + @@ -225,10 +225,10 @@ - - + + - + @@ -431,13 +431,13 @@ - - - - - + + + + + - + Prepare Coreutils for compilation: ./configure --prefix=/usr \ --host=$LFS_TGT \ --build=$(build-aux/config.guess) \ --enable-install-program=hostname \ - --enable-no-install-program=kill,uptime + --enable-no-install-program=kill,uptime \ + gl_cv_macro_MB_CUR_MAX_good=y The meaning of the configure options: From b371ee7b8c818f91ee268937825297ba766360fd Mon Sep 17 00:00:00 2001 From: Thomas Trepl Date: Mon, 1 May 2023 11:29:12 +0200 Subject: [PATCH 03/22] Comment out TIME_T_32_BIT_OK --- chapter08/findutils.xml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml index c12452668..8e90ec3c8 100644 --- a/chapter08/findutils.xml +++ b/chapter08/findutils.xml @@ -47,21 +47,22 @@ Prepare Findutils for compilation: + The meaning of the configure options: - + --localstatedir From 0c83920af32abf7720fb61c6cd5334cb836fd8f8 Mon Sep 17 00:00:00 2001 From: Thomas Trepl Date: Mon, 1 May 2023 11:34:45 +0200 Subject: [PATCH 04/22] Upgrade to linux-6.3.1 --- packages.ent | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages.ent b/packages.ent index d134cf075..97d18abeb 100644 --- a/packages.ent +++ b/packages.ent @@ -432,12 +432,12 @@ - + - + - + + + From b0120361f3d26569dc392d89807da2b9ce2d6edd Mon Sep 17 00:00:00 2001 From: Thomas Trepl Date: Mon, 1 May 2023 16:03:01 +0200 Subject: [PATCH 08/22] Readd configure accidently commented completely. --- chapter08/findutils.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chapter08/findutils.xml b/chapter08/findutils.xml index 8e90ec3c8..4961ea0ae 100644 --- a/chapter08/findutils.xml +++ b/chapter08/findutils.xml @@ -53,6 +53,8 @@ x86_64) ./configure - -prefix=/usr - -localstatedir=/var/lib/locate ;; esac --> + ./configure - -prefix=/usr - -localstatedir=/var/lib/locate + The meaning of the configure options: - ./configure - -prefix=/usr - -localstatedir=/var/lib/locate + ./configure --prefix=/usr --localstatedir=/var/lib/locate The meaning of the configure options: From 04be2abd11490668916c8f6662da4d5040db4dbf Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 1 May 2023 12:48:53 -0500 Subject: [PATCH 10/22] Package updates. Update to vim-9.0.1503. Update to iana-etc-20230418. Update to sysvinit-3.07. Update to iproute2-6.3.0. Update to linux-6.3.1. --- chapter01/changelog.xml | 20 ++++++++++++++++++-- chapter01/whatsnew.xml | 8 ++++---- chapter08/gcc.xml | 4 ++-- packages.ent | 26 +++++++++++++------------- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 039eeff3f..f0b0e6d34 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,8 +40,24 @@ appropriate for the entry or if needed the entire day's listitem. --> - 2023-04-30 + 2023-05-01 + + [bdubbs] - Update to vim-9.0.1503. Addresses + #4500. + + + [bdubbs] - Update to iana-etc-20230418. Addresses + #5006. + + + [bdubbs] - Update to sysvinit-3.07. Fixes + #5250. + + + [bdubbs] - Update to iproute2-6.3.0. Fixes + #5248. + [bdubbs] - Update to gcc-13.1.0. Fixes #5247. @@ -51,7 +67,7 @@ #5246. - [bdubbs] - Update to linux-6.3. Fixes + [bdubbs] - Update to linux-6.3.1. Fixes #5245. diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 91c1846d6..174eb384e 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -151,9 +151,9 @@ - + @@ -235,9 +235,9 @@ - + Systemd-&systemd-version; diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index 546ad6b1a..b6761ba68 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -164,11 +164,11 @@ su tester -c "PATH=$PATH make -k check" Eleven tests in the i386 test suite for the gcc compiler are known to FAIL. It's because the test files do not account for the --enable-default-pie option. - + A few unexpected failures cannot always be avoided. The GCC developers are usually aware of these issues, but have not resolved them yet. Unless the test results are vastly different from those at the above URL, diff --git a/packages.ent b/packages.ent index 3265481cb..c9fdc98de 100644 --- a/packages.ent +++ b/packages.ent @@ -325,10 +325,10 @@ - + - + @@ -351,7 +351,7 @@ - + @@ -382,10 +382,10 @@ - - + + - + @@ -435,7 +435,7 @@ - + @@ -659,10 +659,10 @@ - - + + - + @@ -722,13 +722,13 @@ - + - + - + From 533634949848ef4e2441f80b2441a53864858d56 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Mon, 1 May 2023 22:37:19 -0500 Subject: [PATCH 11/22] Typo --- chapter08/gcc.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index b6761ba68..d2b93a0e6 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -78,7 +78,7 @@ cd build --enable-default-ssp \ --disable-multilib \ --disable-bootstrap \ - --disable-fixinclude \ + --disable-fixincludes \ --with-system-zlib GCC supports seven different computer languages, but the From 050335d4bd4d2691e025fd970438b662861d105a Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 2 May 2023 21:25:09 +0800 Subject: [PATCH 12/22] gcc: Update known test failures for GCC 13 --- chapter08/gcc.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index d2b93a0e6..e89f7e468 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -161,14 +161,14 @@ su tester -c "PATH=$PATH make -k check" url="&test-results;"/> and . - Eleven tests in the i386 test suite for the gcc compiler are known to FAIL. - It's because the test files do not account for the - --enable-default-pie option. - + Two tests named pr104610.c and + pr69482-1.c are known to fail because the test + files does not account for the + --enable-default-ssp option. + + Additionally, two tests named copy.cc and + pr56837.c are known to fail. + A few unexpected failures cannot always be avoided. The GCC developers are usually aware of these issues, but have not resolved them yet. Unless the test results are vastly different from those at the above URL, From 9781ec5baeb533384f8f64063d6d386cfc199dec Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 2 May 2023 22:49:48 +0800 Subject: [PATCH 13/22] gcc: Document the meaning of --disable-fixincludes --- chapter08/gcc.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index e89f7e468..bbef8643c 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -98,6 +98,17 @@ cd build + + --disable-fixincludes + + By default, during the installation of GCC some system + headers would be fixed to be used with GCC. This + is not necessary for a modern Linux system, and potentionally + harmful if a package is reinstalled after installing GCC. This + switch prevents GCC from fixing the headers. + + + --with-system-zlib From 465ada75f34fa49ab5d077b7a6b6f54cbd5a874f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 3 May 2023 11:15:43 +0800 Subject: [PATCH 14/22] gcc: Add libhwasan and libstdc++exp into contents and short desc TODO: HWAsan needs Linux 6.4 (not released yet) and a recent Intel CPU. So it the kernel and hardware support is available, we may see more test failures. I'll try it out on my new system... --- chapter08/gcc.xml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index bbef8643c..df5a0ff07 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -346,10 +346,10 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib and lto-dump libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a, - libgcc_s.so, libgcov.a, libgomp.{a,so}, libitm.{a,so}, + libgcc_s.so, libgcov.a, libgomp.{a,so}, libhwasan.{a,so}, libitm.{a,so}, liblsan.{a,so}, liblto_plugin.so, libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a, - libstdc++.{a,so}, libstdc++fs.a, libsupc++.a, libtsan.{a,so}, + libstdc++.{a,so}, libstdc++exp.a, libstdc++fs.a, libsupc++.a, libtsan.{a,so}, and libubsan.{a,so} /usr/include/c++, /usr/lib/gcc, /usr/libexec/gcc, and @@ -556,6 +556,16 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib + + libhwasan + + The Hardware-assisted Address Sanitizer runtime library + + libhwasan + + + + libitm @@ -619,6 +629,16 @@ mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib + + libstdc++exp + + Experimental C++ Contracts library + + libstdc++exp + + + + libstdc++fs From 8051256700c1741dbb7fc09e39d7e208acb96ef6 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 3 May 2023 11:21:54 +0800 Subject: [PATCH 15/22] psmisc: Run the test suite It seems the package has provided the test suite since some time point. --- chapter08/psmisc.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chapter08/psmisc.xml b/chapter08/psmisc.xml index 6a826202d..cbf7609f3 100644 --- a/chapter08/psmisc.xml +++ b/chapter08/psmisc.xml @@ -49,7 +49,9 @@ make - This package does not come with a test suite. + To run the test suite, run: + +make check Install the package: From 0eb98bde5fc8cdcaaf1143a5c57c4e6e2b784e51 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 7 May 2023 10:56:05 +0800 Subject: [PATCH 16/22] coreutils: Explain gl_cv_macro_MB_CUR_MAX_good=yes --- chapter06/coreutils.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index bbea2f1c4..d3afe3918 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -66,6 +66,14 @@ Perl test suite. + + + gl_cv_macro_MB_CUR_MAX_good=y + + This is needed to work around an issue in the gnulib copy + shipped by the package which would break cross compilation. + + Compile the package: From 45800cdf42b0e6e1b5590792720bbb4ffbe8bc5e Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Sun, 7 May 2023 13:14:29 +0200 Subject: [PATCH 17/22] Fix libstdc++ soversion It's needed in the "stripping" page. --- packages.ent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages.ent b/packages.ent index 3265481cb..3ac3fa4f0 100644 --- a/packages.ent +++ b/packages.ent @@ -238,7 +238,7 @@ - + From 9ae3d8ad311e538d55b0dc6cd4f17de7ba1dd35f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 8 May 2023 19:10:33 +0800 Subject: [PATCH 18/22] whatsnew: Update for GCC 13.1 And let's discourage reusing scripts. --- chapter01/whatsnew.xml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml index 174eb384e..8c2bfda05 100644 --- a/chapter01/whatsnew.xml +++ b/chapter01/whatsnew.xml @@ -11,13 +11,25 @@ What's new since the last release - In the 11.3 release, --enable-default-pie - and --enable-default-ssp are enabled for GCC. - These techniques can mitigate some malicious attacks, but they do not provide - perfect security. Note that some textbooks assume these options are - disabled, so that if you run examples from such a textbook on an LFS system, - you may need to disable PIE and SSP with the GCC options - -fno-pie -no-pie -fno-stack-protection. + + + During a development cycle of LFS, the instructions in the book is + often modified to adapt for a package update or take the advantage of + new features from updated packages. Mixing up the instructions of + different versions of the LFS book can cause subtle breakages. This + kind of issue is generally a result from reusing some script created + for a prior LFS release. Such a reuse is strongly discouraged. If + you are reusing scripts for a prior LFS release for any reason, you'll + need to be very careful to update the scripts to match current version + of the LFS book. + + + + In the 11.4 release, --disable-fixincludes + is set for GCC. It's a configure switch newly added in GCC 13.1 to + prevent GCC from fixing the system headers. Such a + fix is unnecessary for a modern Linux system and may cause + issues if a package is updated after installing GCC. Here is a list of the packages updated since the previous release of LFS. From 740ee46aeff1a6b24b77f44a55968d690e739c36 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 10 May 2023 16:25:04 +0800 Subject: [PATCH 19/22] systemd: Fix runtime issues exploited by GCC 13 (#5254) Switch to "meson setup" from the plain "meson" by the way. --- chapter08/systemd.xml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index 31d89e01a..545f47889 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -40,6 +40,19 @@ Installation of systemd + + Remove several inappropriate uses of the pure + attribute or they'd cause runtime issues when the package is built + with GCC 13 or later: + + +sed '/bus_message_type_from_string/s/_pure_//' \ + -i src/libsystemd/sd-bus/bus-internal.h && +sed '/devt_hash_func/s/_pure_//' \ + -i src/basic/hash-funcs.h && +sed '/job_get_timeout/s/_pure_//' \ + -i src/core/job.h + Remove two unneeded groups, render and sgx, from the default udev @@ -53,7 +66,8 @@ mkdir -p build cd build -meson --prefix=/usr \ +meson setup \ + --prefix=/usr \ --buildtype=release \ -Ddefault-dnssec=no \ -Dfirstboot=false \ From 6d4ba5f08ac28a82f519c0be7eafc011c8c7f670 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 13 May 2023 15:09:44 +0800 Subject: [PATCH 20/22] gcc: Note some additional test failures --- chapter08/gcc.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index df5a0ff07..281883c0a 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -177,8 +177,12 @@ su tester -c "PATH=$PATH make -k check" files does not account for the --enable-default-ssp option. - Additionally, two tests named copy.cc and - pr56837.c are known to fail. + Two tests named copy.cc and + pr56837.c are known to fail. + + Additionally, several tests in the + vect directory are known to fail + if the hardware does not support AVX. A few unexpected failures cannot always be avoided. The GCC developers are usually aware of these issues, but have not resolved them yet. From b2ef0209a0b9fa4053f7c8cc738e00081b8793d0 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 13 May 2023 15:35:56 +0800 Subject: [PATCH 21/22] Package update and add changelog for systemd runtime issue fix Update to less-633 (#5251) Update to linux-6.3.2 (#5255) Update to xz-5.4.3 (#5252) Update to gawk-5.2.2 (#5253) --- chapter01/changelog.xml | 25 +++++++++++++++++++++++++ packages.ent | 24 ++++++++++++------------ 2 files changed, 37 insertions(+), 12 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index f0b0e6d34..9e0629586 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,31 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2023-05-13 + + [xry111] - Update to less-633. Fixes + #5251. + + + [xry111] - Update to linux-6.3.2. Fixes + #5255. + + + [xry111] - Update to xz-5.4.3. Fixes + #5252. + + + [xry111] - Update to gawk-5.2.2. Fixes + #5253. + + + [xry111] - Fix systemd runtime issue exploited by GCC 13. + Fixes #5254. + + + + 2023-05-01 diff --git a/packages.ent b/packages.ent index 4546cd49e..88a61d6d2 100644 --- a/packages.ent +++ b/packages.ent @@ -215,10 +215,10 @@ - - + + - + @@ -382,10 +382,10 @@ - - + + - + @@ -432,12 +432,12 @@ - + - + - + 2023-05-13 + [xry111] - Update to less-633. Fixes #5251.