From 4a1702309d221648b642d397bb9780f7b102c78a Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 29 Jun 2026 14:12:11 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20prefix=20=E2=80=94=20auto-patch=20GCC=20?= =?UTF-8?q?cstdlib=20strtold=20on=20rebuild?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 13 cstdlib uses ::strtold but relibc only declares it (no impl). Remove 'using ::strtold' from C++ stdlib header at prefix build time. --- mk/prefix.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mk/prefix.mk b/mk/prefix.mk index 1ce6687588..97c9c33fb7 100644 --- a/mk/prefix.mk +++ b/mk/prefix.mk @@ -113,6 +113,10 @@ else # libc.a copy in the toolchain is identical to the one just compiled. cp -rf "$@/$(GNU_TARGET)/lib/"* "$(PREFIX)/gcc-install/$(GNU_TARGET)/lib/" cp -rf "$@/$(GNU_TARGET)/include/"* "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/" +# Fix GCC 13 — relibc declares but doesn't implement strtold (long double). +# GCC was built with _GLIBCXX_USE_C99_STDLIB=1 but relibc lacks the symbol. +# Remove 'using ::strtold' from the C++ stdlib header to prevent compile errors. + sed -i '/using ::strtold;/d; /using ::__gnu_cxx::strtold;/d' "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++"/*/cstdlib 2>/dev/null || true # Propagate fresh relibc artifacts to the redoxer toolchain at # ~/.redoxer//toolchain/. The redoxer ships its own sysroot # snapshot from initial setup; without this sync the GCC driver inside