diff --git a/geo/qgis/patches/patch-src_core_CMakeLists_txt b/geo/qgis/patches/patch-src_core_CMakeLists_txt index 2ae4de4d9c2..0338815dc58 100644 --- a/geo/qgis/patches/patch-src_core_CMakeLists_txt +++ b/geo/qgis/patches/patch-src_core_CMakeLists_txt @@ -1,5 +1,11 @@ https://github.com/qgis/QGIS/issues/61855 +chunk2 : try to fix the build with llvm22, cf https://github.com/qgis/QGIS/issues/66293 + +set SKIP_PRECOMPILED_HEADERS ON on qgsexpression_texts.cpp otherwise clang complains about mismatching optimization levels: +error: OptimizationLevel differs in precompiled file '/usr/obj/ports/qgis-4.0.3/build-amd64/src/core/CMakeFiles/qgis_core.dir/cmake_pch.hxx.pch' vs. current file + +use -O0 on textrenderer/qgsfontmanager.cpp otherwise c++ spins forever Index: src/core/CMakeLists.txt --- src/core/CMakeLists.txt.orig +++ src/core/CMakeLists.txt @@ -12,7 +18,17 @@ Index: src/core/CMakeLists.txt SET(PDF4QT_BUILD_ONLY_CORE_LIBRARY TRUE) SET(PDF4QT_ENABLE_OPENGL FALSE) SUBDIRS(${CMAKE_SOURCE_DIR}/external/PDF4QT) -@@ -2675,10 +2675,15 @@ target_include_directories(qgis_core PUBLIC +@@ -2294,7 +2294,8 @@ if(MSVC) + ) + else() + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND (CMAKE_BUILD_TYPE MATCHES Release OR CMAKE_BUILD_TYPE MATCHES RelWithDebInfo)) +- set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp PROPERTIES COMPILE_FLAGS "-O1") ++ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/qgsexpression_texts.cpp PROPERTIES COMPILE_FLAGS "-O1" SKIP_PRECOMPILE_HEADERS ON) ++ set_source_files_properties(textrenderer/qgsfontmanager.cpp PROPERTIES COMPILE_FLAGS "-O0" SKIP_PRECOMPILE_HEADERS ON) + set_source_files_properties(proj/qgscoordinatereferencesystem.cpp PROPERTIES COMPILE_FLAGS "-mllvm -inline-threshold=128") + endif() + endif() +@@ -2675,10 +2676,15 @@ target_include_directories(qgis_core PUBLIC ${CMAKE_SOURCE_DIR}/external/earcut )