From d0f9a5150e9a4456c5246e2c1488ad2dc72decb2 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Mon, 23 Dec 2024 13:58:09 +0800 Subject: [PATCH] gcc: Add --enable-targets=all for -m64 on 32-bit LFS The support is needed for building GRUB for 64-bit UEFI on 32-bit LFS. --- chapter08/gcc.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/chapter08/gcc.xml b/chapter08/gcc.xml index b3397d8be..e0b0f08f5 100644 --- a/chapter08/gcc.xml +++ b/chapter08/gcc.xml @@ -64,6 +64,7 @@ cd build --enable-default-pie \ --enable-default-ssp \ --enable-host-pie \ + --enable-targets=all \ --disable-multilib \ --disable-bootstrap \ --disable-fixincludes \ @@ -104,6 +105,16 @@ cd build the Zlib library, rather than its own internal copy. + + + --enable-targets=all/ + + This switch tells GCC to enable 64-bit code generation + support even if we are building it for a 32-bit system. + It's needed to build GRUB for 64-bit UEFI. This switch has no + effect if building a 64-bit LFS. + +