From ab7af9e6f0b84495f5f8098da810727e51837c1e Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Sat, 26 Mar 2022 23:21:06 +0800 Subject: libffi: reword the note about "building for another system" Telling the user to override CFLAGS and CXXFLAGS may cause two problems: 1. We've added --with-gcc-arch=native, so the configure script will add "-march=native" into CFLAGS. Then we've not really verified which -march= value is the last one in the GCC command line and being really used. 2. User may just export CFLAGS="-march=x86_64", without "-O2". This will produce unoptimized binaries. --- chapter08/libffi.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chapter08') diff --git a/chapter08/libffi.xml b/chapter08/libffi.xml index d71f8d2e6..4f778961d 100644 --- a/chapter08/libffi.xml +++ b/chapter08/libffi.xml @@ -44,8 +44,10 @@ Similar to GMP, libffi builds with optimizations specific - to the processor in use. If building for another system, export - CFLAGS and CXXFLAGS to specify a generic build for your architecture. + 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 + CPU on that system. If this is not done, all applications that link to libffi will trigger Illegal Operation Errors. -- cgit v1.2.3-54-g00ecf