On Sunday 03 May 2026 20:51:17 LIU Hao wrote:
> 在 2026-5-3 20:10, Pali Rohár 写道:
> > +#if defined(__i386__)
> > +/* Align ESP on 16-byte boundaries. */
> > +# if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 &&
> > __GNUC_MINOR__ >= 2))
> > +__attribute__((force_align_arg_pointer))
> > +# endif
>
> Is this check necessary? I think we can always use the attribute like in
> crt{dll,exe}.c
I'm not exactly sure.
Same check is in other winpthreads code, so I followed pattern and used
it in winpthreads tests too, so code in winpthreads is consistent.
> BTW, this is actually a GCC bug, and it should be fixed in GCC 16; see
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111107. The workaround for GCC
> 15- is to compile with `-mincoming-stack-boundary=2
> -mpreferred-stack-boundary=2`.
I know, I have figured it out that it is gcc bug and already found bug
reports on internet.
Maybe if the workaround with `-mincoming-stack-boundary=2
-mpreferred-stack-boundary=2`
is working, could we add it to mingw-w64 CFLAGS when compiling with
gcc-pre-15 and force_align_arg_pointer would not be needed to have it on
every place in mingw-w64 source code?
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public