From aaed7211b2a6e7ebadb878603a0fa18d85d8be59 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Thu, 12 Dec 2024 18:02:16 -0600 Subject: [PATCH] build: Install QEMU Although most software can be cross-compiled, there are quite a few edge cases where executables built for the target system need to be run on the build host. Notably, `ldconfig` only considers libraries for the same machine type as the tool itself, so it's impossible to run it in a cross-compiled root. In order to get passed these situations, we can use QEMU in user mode to emulate the target architecture, allowing ARM executables to run on AMD64 machines. --- lib/tools.sh | 1 + portage/package.use/qemu | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 portage/package.use/qemu diff --git a/lib/tools.sh b/lib/tools.sh index 3fe5b5c..77983ca 100755 --- a/lib/tools.sh +++ b/lib/tools.sh @@ -5,6 +5,7 @@ sys-apps/shadow EOF xargs -r emerge -vnuUj --rebuilt-binaries=y --color=y < (11 Dec 2024) +# Build a minimal QEMU for chrooting into the target environment +app-emulation/qemu -* QEMU_USER_TARGETS: aarch64 PYTHON_TARGETS: python3_12