From a2bf74a9b5ec941a61974490ae40e247f2db2e58 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sun, 9 Mar 2025 13:08:32 +0800 Subject: [PATCH] More info about "deploying LFS" --- chapter08/libffi.xml | 7 +++++-- chapter08/pkgmgt.xml | 12 +++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/chapter08/libffi.xml b/chapter08/libffi.xml index 40af81288..f15d08b07 100644 --- a/chapter08/libffi.xml +++ b/chapter08/libffi.xml @@ -51,11 +51,14 @@ Like GMP, Libffi builds with optimizations specific to the processor in use. If building for another system, change the value of the --with-gcc-arch= parameter in the - following command to an architecture name fully implemented by the + following command to an architecture name fully implemented by + both the host CPU and the CPU on that system. If this is not done, all applications that link to libffi will trigger - Illegal Operation Errors. + Illegal Operation Errors. If you cannot figure out a value + safe for both the CPUs, replace the parameter with + to produce a generic library. Prepare Libffi for compilation: diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml index 10ec5d199..7cda95755 100644 --- a/chapter08/pkgmgt.xml +++ b/chapter08/pkgmgt.xml @@ -370,11 +370,13 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install differences in system hardware and the original kernel configuration. - There have been some reports of issues when copying between - similar but not identical architectures. For instance, the instruction set - for an Intel system is not identical with the AMD processor's instructions, and later - versions of some processors may provide instructions that are unavailable with - earlier versions. + If you want to deploy the LFS system onto a system + with a different CPU, when you build and + you must follow the notes about + overriding the architecture-specific optimization to produce libraries + suitable for both the host system and the system(s) where you'll deploy + the LFS system. Otherwise you'll get Illegal + Instruction errors running LFS. Finally, the new system has to be made bootable via .