From b1b8c3865a8a6369d40eda5a31075733b9e40d63 Mon Sep 17 00:00:00 2001 From: vasilito Date: Mon, 29 Jun 2026 11:33:21 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20toolchain=20=E2=80=94=20disable=20PCH=20?= =?UTF-8?q?(strtold=20missing=20from=20precompiled=20headers)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC needs ::strtold. -include stdlib.h works for normal compilation but PCH compiles without -include flags. Disabling PCH globally prevents strtold visibility issues in all Qt/KF6 packages. --- local/recipes/qt/redox-toolchain.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/local/recipes/qt/redox-toolchain.cmake b/local/recipes/qt/redox-toolchain.cmake index fe74e9610e..cae3527408 100644 --- a/local/recipes/qt/redox-toolchain.cmake +++ b/local/recipes/qt/redox-toolchain.cmake @@ -42,13 +42,13 @@ 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. -# Ensure C99 stdlib declarations (strtold etc.) are visible before Qt headers -# pull in . Needed for KF6/Qt C++ builds on relibc which declares -# strtold but implements it via libredbear-qt-strtold-compat.so. 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) +# Disable precompiled headers — PCH compiles without -include flags, +# missing C99 stdlib declarations (strtold) needed by GCC . +set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON CACHE BOOL "" 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