fix: toolchain — disable PCH (strtold missing from precompiled headers)
GCC <cstdlib> 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.
This commit is contained in:
@@ -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 <cstdlib>. 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 <cstdlib>.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user