$OpenBSD: patch-cmake_compiler_settings_cmake,v 1.3 2020/09/04 15:40:11 mariani Exp $

Index: cmake/compiler_settings.cmake
--- cmake/compiler_settings.cmake.orig
+++ cmake/compiler_settings.cmake
@@ -56,7 +56,8 @@
 # Turn on more aggrassive optimizations not supported by CMake
 # References: https://wiki.qt.io/Performance_Tip_Startup_Time
 #-----------------------------------------------------------------------------
-if (CMAKE_COMPILER_IS_GNUCXX OR LXQT_COMPILER_IS_CLANGCXX)
+if ((CMAKE_COMPILER_IS_GNUCXX OR LXQT_COMPILER_IS_CLANGCXX) AND
+    NOT (CMAKE_SYSTEM_NAME STREQUAL OpenBSD))
     # -flto: use link-time optimizations to generate more efficient code
     if (CMAKE_COMPILER_IS_GNUCXX)
         set(LTO_FLAGS "-flto -fuse-linker-plugin")
