From e8d3cf0909f5ebbd81245d7bca6ed3dd77ddb92d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 23 Feb 2022 12:01:47 -0800 Subject: [PATCH] qsimd.cpp: fix _FORTIFY_SOURCE=2 builds That option makes printf() and some other functions become always_inline functions with extent checking. Unfortunately, that also means GCC fails to inline them when we're not compiling for the same target as X86_BASELINE. Fixes: QTBUG-101198 Change-Id: Ibf4acec0f166495998f7fffd16d682c7a7be94d8 Reviewed-by: Allan Sandfeld Jensen --- src/corelib/CMakeLists.txt | 1 + src/corelib/global/qsimd.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index ffd22d6884..89abd8d863 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -287,6 +287,7 @@ _qt_internal_setup_deploy_support() set(corelib_no_pch_sources compat/removed_api.cpp + global/qsimd.cpp ) foreach(src ${corelib_no_pch_sources}) diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp index d2a0686097..fea25a73d7 100644 --- a/src/corelib/global/qsimd.cpp +++ b/src/corelib/global/qsimd.cpp @@ -40,6 +40,7 @@ // we need ICC to define the prototype for _rdseed64_step #define __INTEL_COMPILER_USE_INTRINSIC_PROTOTYPES +#undef _FORTIFY_SOURCE // otherwise, the always_inline from stdio.h fail to inline #include "qsimd_p.h" #include "qalgorithms.h"