From 5ba41a882b936b8858926cd3b29cb20be0bf1e43 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 14 Feb 2025 21:52:51 +0800 Subject: [PATCH] glibc: Fix another flaw in update process regarding "fixed" includes --- chapter08/glibc.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml index 79137416f..c803d0c07 100644 --- a/chapter08/glibc.xml +++ b/chapter08/glibc.xml @@ -322,10 +322,14 @@ install -vm755 dest/usr/lib/*.so.* /usr/lib When the system has successfully rebooted, if you are running a LFS system prior to 12.0 (exclusive) where GCC was not built with the --disable-fixincludes option, + move two GCC headers into a better location and remove the stale fixed copies of the Glibc headers: - rm -rfv $(dirname $(gcc -print-libgcc-file-name))/include-fixed/* + DIR=$(dirname $(gcc -print-libgcc-file-name)) +[ -e $DIR/include/limits.h ] || mv $DIR/include{-fixed,}/limits.h +[ -e $DIR/include/syslimits.h ] || mv $DIR/include{-fixed,}/syslimits.h +rm -rfv $(dirname $(gcc -print-libgcc-file-name))/include-fixed/* Install the package: