fix: root-cause strtold — patch GCC <cstdlib> at prefix build time
Add explicit #include <stdlib.h> after #include_next <stdlib.h> in GCC 13 cstdlib. This ensures ::strtold is declared before the using-directives execute. Previously relibc's declaration was not visible to the C++ wrapper. Reverted unjustified ignores: qt6-sensors, kf6-ki18n, kf6-kidletime, kf6-kwayland, redbear-greeter — per project policy: fix, don't ignore. Also reverted kf6-ki18n to full build (stub removed).
This commit is contained in:
@@ -72,7 +72,7 @@ qtdeclarative = {}
|
||||
qtsvg = {}
|
||||
qtwayland = {}
|
||||
qt6-wayland-smoke = {}
|
||||
qt6-sensors = "ignore"
|
||||
qt6-sensors = {}
|
||||
|
||||
# KF6 Frameworks — explicit real-build surface in alphabetical order
|
||||
# kirigami: blocked (Qt6 Wayland null+8 crash — NOT QML gate; headers/libs DO exist)
|
||||
@@ -96,9 +96,9 @@ kf6-kdbusaddons = {}
|
||||
kf6-kdeclarative = {}
|
||||
kf6-kded6 = {}
|
||||
kf6-kguiaddons = {}
|
||||
kf6-ki18n = "ignore"
|
||||
kf6-ki18n = {}
|
||||
kf6-kiconthemes = {}
|
||||
kf6-kidletime = "ignore"
|
||||
kf6-kidletime = {}
|
||||
kf6-kitemmodels = {}
|
||||
kf6-kitemviews = {}
|
||||
kf6-kjobwidgets = {}
|
||||
@@ -106,7 +106,7 @@ kf6-knotifications = {}
|
||||
kf6-kpackage = {}
|
||||
kf6-kservice = {}
|
||||
kf6-ktextwidgets = {}
|
||||
kf6-kwayland = "ignore"
|
||||
kf6-kwayland = {}
|
||||
kf6-kwidgetsaddons = {}
|
||||
kf6-kxmlgui = {}
|
||||
kf6-prison = {}
|
||||
@@ -136,7 +136,7 @@ kwin = {}
|
||||
redbear-authd = {}
|
||||
redbear-session-launch = {}
|
||||
seatd = {}
|
||||
redbear-greeter = "ignore"
|
||||
redbear-greeter = {}
|
||||
pam-redbear = {}
|
||||
sddm = {}
|
||||
amdgpu = {}
|
||||
|
||||
+10
-8
@@ -113,14 +113,16 @@ 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 <cstdlib> — 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.
|
||||
# Also remove stold() from basic_string.h which references std::strtold.
|
||||
export _GCC_CSTDLIB="$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++"/*/cstdlib; \
|
||||
sed -i '/using ::strtold;/d; /using ::__gnu_cxx::strtold;/d' $$_GCC_CSTDLIB 2>/dev/null || true; \
|
||||
STRHDR="$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++"/*/bits/basic_string.h; \
|
||||
sed -i '/inline long double/,/^#endif \/\/ _GLIBCXX_USE_C99_STDLIB/{ /stold(/,/^#endif/d; }' $$STRHDR 2>/dev/null || true
|
||||
# Relibc declares strtold in stdlib.h, but GCC <cstdlib>'s include_next
|
||||
# may not find it before processing 'using ::strtold'. Prepend an
|
||||
# explicit #include <stdlib.h> to the C++ header so ::strtold is in
|
||||
# scope by the time the using-directives execute. The edit must
|
||||
# happen AFTER the #include_next <stdlib.h> line (which brings in
|
||||
# most of the C declarations) but BEFORE the first using-directive.
|
||||
for _cstdlib in "$(PREFIX)/gcc-install/$(GNU_TARGET)/include/c++"/*/cstdlib; do \
|
||||
[ -f "$$_cstdlib" ] || continue; \
|
||||
sed -i '/^#include_next <stdlib.h>$$/a\\n// Red Bear: relibc declares strtold via cbindgen trailer.\n// The explicit include ensures ::strtold is visible when the\n// C++ wrapper processes its using-directives below.\n#include <stdlib.h>' "$$_cstdlib"; \
|
||||
done
|
||||
# Propagate fresh relibc artifacts to the redoxer toolchain at
|
||||
# ~/.redoxer/<target>/toolchain/. The redoxer ships its own sysroot
|
||||
# snapshot from initial setup; without this sync the GCC driver inside
|
||||
|
||||
Reference in New Issue
Block a user