From 6ef3e43fc042ed0e4aa816829c70c5c05cb9934c Mon Sep 17 00:00:00 2001 From: Joachim Henze Date: Mon, 18 Oct 2021 01:50:17 +0200 Subject: [PATCH] [0.4.14][SDK][FREETYPE] Fix GCC8.4 -O2 build CORE-17820 RosBE2.2.1 Win GCC8.4.0 RELEASE bootcd build was failing. This was the last build error for the configuration: -DENABLE_ROSTESTS=1 -DCMAKE_BUILD_TYPE=Release fix picked from 0.4.15-dev-285-g 5349f49cfec9065d804d2f8be31bda1eb337ad5b Sidenote of current compiler support on releases/0.4.14 (tested on 0.4.14-RC-110-g8600a00): RosBE2.1.2 Lin GCC4.7.2 Debug build worked before and after this commit (bootcd+livecd) <- primary toolchain for releases/0.4.14 RosBE2.1.6 Win GCC4.7.2 Debug build worked before and after this commit (bootcd+livecd) RosBE2.1.6 Win GCC4.7.2 Release build worked before and after this commit (bootcd+livecd) RosBE2.2.1 Win GCC8.4.0 Debug build worked before and after this commit (bootcd+livecd) RosBE2.1.6 Win MSVC2010SP1 Debug build worked before and after this commit (bootcd+livecd) RosBE2.1.6 Win MSVC2010SP1 Release build worked before and after this commit (bootcd+livecd) VSSolution msbuild 2010SP1 Debug build should also work, last time tested 0.4.14-RC-68-g366c46b Newer MSVC (<= MSVC19.28.29115) might/should work as well, but I did not explicitly test those myself. --- sdk/lib/3rdparty/freetype/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sdk/lib/3rdparty/freetype/CMakeLists.txt b/sdk/lib/3rdparty/freetype/CMakeLists.txt index f14ed5c47f5..17a30c10d24 100644 --- a/sdk/lib/3rdparty/freetype/CMakeLists.txt +++ b/sdk/lib/3rdparty/freetype/CMakeLists.txt @@ -60,6 +60,8 @@ list(APPEND SOURCE add_library(freetype ${SOURCE}) -if(USE_CLANG_CL) +if(GCC) + target_compile_options(freetype PRIVATE -fno-builtin-malloc) +elseif(USE_CLANG_CL) target_compile_options(freetype PRIVATE "-Wno-tautological-constant-compare") endif()