On Tue, 20 Sep 2022, Pali Rohár wrote:
There are many, many different variants of inline behaviour - C89 inline,
C99 inline, static inline, extern inline, gnu_inline, etc. There's a couple
different styles used here; all the inline functions that we're talking
about here have static inline linka
On Tue, 20 Sep 2022, Alvin Wong via Mingw-w64-public wrote:
This adds support to enable building mingw-w64-crt and user code with
Control Flow Guard using Clang, with the option `--enable-cfguard`. In
addition to adding the Clang 16 compiler option `-mguard=cf` to CFLAGS,
it also add two new obj
While the compiler drivers do add -lssp automatically when
linking with -fstack-protector-strong, this also allows relying
entirely on libmingwex. This implementation should be functionally
equivalent to GCC's libssp for a mingw build configuration.
This allows toolchains that don't otherwise use
This is the subset of functions that ends up called when our headers
are used with _FORTIFY_SOURCE defined. This avoids needing to
manually pass -lssp in such build configurations.
Signed-off-by: Martin Storsjö
---
v2: Made the message buffer static const.
Switched the __chk_fail function to IsP
Signed-off-by: Martin Storsjö
---
mingw-w64-headers/crt/_mingw.h.in | 25 +
1 file changed, 25 insertions(+)
diff --git a/mingw-w64-headers/crt/_mingw.h.in
b/mingw-w64-headers/crt/_mingw.h.in
index 0ef7ae6ea..087fce88d 100644
--- a/mingw-w64-headers/crt/_mingw.h.in
+++ b
Our fortification macros don't wrap these stdio functions (since
there's already lots of variability, whether calling directly to
the CRT's stdio functions, or if calling the __USE_MINGW_ANSI_STDIO
replacements), but this at least provides token implementations
if someone implements fortification o
On 9/19/22 13:38, Yannis Juglaret wrote:
This fixes the struct used to enable the Arbitrary Code Guard mitigation
or query its status on Windows. The size of the struct was wrong, which
could lead calls to Get/SetProcessMitigationPolicy to fail with the last
error set to ERROR_INVALID_PARAMETER.
Without the change build fails with missing dependency on _extra
library similar to the following:
cd lib32/ && x86_64-w64-mingw32-ar -M <
/build/mingw-w64/mingw-w64-crt/lib32/msvcr71.mri
x86_64-w64-mingw32-ar: libmsvcr71_extra.a: No such file or directory
make[3]: *** [Makefile:78262
Before the change massively parallel builds failed when Makefile
attempted to build both lib64/libd3dx9_38.a and lib32/libd3dx9_38.a:
x86_64-w64-mingw32-dlltool --as-flags=--64 -m i386:x86-64 ... \
--output-lib lib64/libd3dx9_38.a \
--temp-prefix $(basename lib64/libd3dx9_38.a .a)