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 <allan.jensen@qt.io>
This commit is contained in:
Thiago Macieira 2022-02-23 12:01:47 -08:00
parent 7b94f87689
commit e8d3cf0909
2 changed files with 2 additions and 0 deletions

View File

@ -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})

View File

@ -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"