fix: undef _GLIBCXX_USE_C99_STDLIB for all Qt/KF6 via toolchain

GCC <cstdlib> uses C99 stdlib wrappers (strtold etc.) gated by this macro.
relibc declares but doesn't implement strtold. Undef at toolchain level
prevents 'using ::strtold' errors in KF6/Qt C++ builds.
This commit is contained in:
2026-06-29 07:28:25 +03:00
parent 9d025116c2
commit 85a6a7d892
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -40,6 +40,8 @@ cmake "${COOKBOOK_SOURCE}" \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}" \
-DCMAKE_C_FLAGS="-U_GLIBCXX_USE_C99_STDLIB" \
-DCMAKE_CXX_FLAGS="-U_GLIBCXX_USE_C99_STDLIB" \
-DCMAKE_C_STANDARD_LIBRARIES="-liconv" \
-DCMAKE_CXX_STANDARD_LIBRARIES="-liconv" \
-DCMAKE_SHARED_LINKER_FLAGS="-liconv" \
+4 -4
View File
@@ -42,10 +42,10 @@ set(CMAKE_SYSTEM_VERSION 1)
# Redox userspace currently must not emit CET/IBT entry instructions (endbr64),
# because they trap as invalid opcode in the current runtime stack.
set(CMAKE_C_FLAGS "-fcf-protection=none -march=x86-64 -include strings.h -include stdlib.h" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h -include stdlib.h -I${COOKBOOK_SYSROOT}/usr/include/QtQml -I${COOKBOOK_SYSROOT}/usr/include/QtQuick" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -include strings.h -include stdlib.h" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h -include stdlib.h" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS "-fcf-protection=none -march=x86-64 -include strings.h -include stdlib.h -U_GLIBCXX_USE_C99_STDLIB" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h -include stdlib.h -U_GLIBCXX_USE_C99_STDLIB -I${COOKBOOK_SYSROOT}/usr/include/QtQml -I${COOKBOOK_SYSROOT}/usr/include/QtQuick" CACHE STRING "" FORCE)
set(CMAKE_C_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -include strings.h -include stdlib.h -U_GLIBCXX_USE_C99_STDLIB" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS_RELEASE "-fcf-protection=none -march=x86-64 -fpermissive -include strings.h -include stdlib.h -U_GLIBCXX_USE_C99_STDLIB" CACHE STRING "" FORCE)
# Flag for redox.patch: enables REDOX-specific CMake code paths (mkspec, QPA plugin).
# QtPlatformSupport.cmake checks this variable. Set as CACHE INTERNAL so it persists