From 4e58d1c77fbf89aad99e86504a2ab5555784047c Mon Sep 17 00:00:00 2001 From: Marcelo Alcantara Date: Fri, 25 Sep 2026 20:45:29 +1000 Subject: [PATCH] Give cc1plus enough stack for aquamarine under emulation DRM.cpp needs more than 8 MiB of compiler stack. GCC raises its own limit natively, but the aarch64 builder runs under QEMU user-mode emulation, which fixes the guest stack at exec and ignores setrlimit, so cc1plus segfaulted. Unpatched 0.15.1 fails the same way. QEMU_STACK_SIZE sizes it at exec; native builds ignore it and the object code is identical. --- pkgbuilds/aquamarine/PKGBUILD | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgbuilds/aquamarine/PKGBUILD b/pkgbuilds/aquamarine/PKGBUILD index a9ed9e0..2b16e74 100644 --- a/pkgbuilds/aquamarine/PKGBUILD +++ b/pkgbuilds/aquamarine/PKGBUILD @@ -44,6 +44,12 @@ prepare() { build() { cd "$_archive" + # cc1plus needs more than 8 MiB of stack for DRM.cpp. GCC raises its own + # limit natively, but under QEMU user-mode emulation (the aarch64 builder) + # the guest stack is fixed at exec and setrlimit is ignored, so the compiler + # segfaults. QEMU reads this at exec; native builds ignore it. The object + # code is identical either way. + export QEMU_STACK_SIZE=64M cmake -B build \ -D CMAKE_INSTALL_PREFIX=/usr \ -D CMAKE_BUILD_TYPE=Release