1
0
mirror of https://git.code.sf.net/p/mingw-w64/mingw-w64 synced 2025-04-18 17:44:18 +03:00

crt: Build with -fno-builtin.

mingw-w64-crt implements a number of functions that the compiler considers
built-in. Currently, we must be cautious about compiler optimizations, as they
may not align with our intentions. In theory, the compiler could optimize an
implementation of such a function back into a call to itself.

Rather than second-guessing the optimizer and reimplementing problematic
functions in assembly, disable built-in functions globally for mingw-w64-crt.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Jacek Caban 2025-03-21 15:09:14 +01:00
parent ebf7183b4f
commit 57ec2cff5f

View File

@ -20,7 +20,7 @@ else
endif
AM_CPPFLAGS=$(sysincludes)
AM_CFLAGS=-pipe -std=gnu99 -D_CRTBLD -D_WIN32_WINNT=0x0f00 -D__MSVCRT_VERSION__=0x600 -D__USE_MINGW_ANSI_STDIO=0 @IMAGEBASE_CFLAGS@ @CFGUARD_CFLAGS@ @ADD_C_CXX_WARNING_FLAGS@ @ADD_C_ONLY_WARNING_FLAGS@
AM_CFLAGS=-pipe -std=gnu99 -fno-builtin -D_CRTBLD -D_WIN32_WINNT=0x0f00 -D__MSVCRT_VERSION__=0x600 -D__USE_MINGW_ANSI_STDIO=0 @IMAGEBASE_CFLAGS@ @CFGUARD_CFLAGS@ @ADD_C_CXX_WARNING_FLAGS@ @ADD_C_ONLY_WARNING_FLAGS@
AM_CXXFLAGS=@ADD_C_CXX_WARNING_FLAGS@ @ADD_CXX_ONLY_WARNING_FLAGS@
AM_CCASFLAGS=@CFGUARD_CFLAGS@
CPPFLAGSARM32=-mfpu=vfpv3