[Mingw-w64-public] [PATCH v2] headers: Implement __debugbreak, MemoryBarrier and YieldProcessor for armv7 and aarch64

2021-01-17 Thread Martin Storsjö
Signed-off-by: Martin Storsjö --- Added memory clobbers for MemoryBarrier(). --- mingw-w64-headers/crt/_mingw.h.in | 8 mingw-w64-headers/include/winnt.h | 6 ++ 2 files changed, 14 insertions(+) diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in

[Mingw-w64-public] [PATCH] crt: Remove support for providing __CTOR_LIST__ for LLD 7 and older

2021-01-17 Thread Martin Storsjö
This reverts commit ccda8b5229e428a6fa7036140778b23d11b554e8 and removes the code for providing __CTOR_LIST__ here. This was only needed for LLD 7 and older, while LLD 8 got support for providing __CTOR_LIST__ by the linker, just as GNU ld does. This gets rid of a brittle configure check and

Re: [Mingw-w64-public] [PATCH 1/3] crt: Don't run TLS destructors for the main thread if exiting via _exit or ExitProcess

2021-01-17 Thread Jeremy Drake via Mingw-w64-public
On Sun, 17 Jan 2021, Martin Storsjö wrote: > What about patching upstream gcc/libstdc++ to add an option for preferring to > provide its own __cxa_thread_atexit even if the platform seems to have one? > Ideally it'd default to enabled for mingw platforms. > > // Martin > Hopefully that would be

Re: [Mingw-w64-public] Build error with mingw-8.0.0 and gcc-11: multiple definition of `__DTOR_LIST__' / `__CTOR_LIST__

2021-01-17 Thread Martin Storsjö
Hi, On Sun, 17 Jan 2021, Sandro Mani wrote: I'm working on updating the mingw toolchain for Fedora, and am building mingw-gcc-11 with mingw-crt-8.0.0. I'm stuck at this error when linking libgcc [1]: /usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x0): multiple definition of

[Mingw-w64-public] Build error with mingw-8.0.0 and gcc-11: multiple definition of `__DTOR_LIST__' / `__CTOR_LIST__

2021-01-17 Thread Sandro Mani
Hi I'm working on updating the mingw toolchain for Fedora, and am building mingw-gcc-11 with mingw-crt-8.0.0. I'm stuck at this error when linking libgcc [1]: /usr/i686-w64-mingw32/bin/ld: _ctors_s.o:libgcc2.c:(.bss+0x0): multiple definition of `__DTOR_LIST__';

Re: [Mingw-w64-public] [PATCH 1/3] crt: Don't run TLS destructors for the main thread if exiting via _exit or ExitProcess

2021-01-17 Thread Martin Storsjö
On Thu, 14 Jan 2021, Martin Storsjö wrote: On Wed, 13 Jan 2021, Jeremy Drake wrote: On Wed, 13 Jan 2021, Martin Storsjö wrote: The pragmatic path forward in that case, I think, would to add a configure option to mingw-w64-crt for optionally enabling the __cxa_thread_atexit function. So if

Re: [Mingw-w64-public] [PATCH 1/3] crt: Don't run TLS destructors for the main thread if exiting via _exit or ExitProcess

2021-01-17 Thread Mateusz Mikuła
> > It can very well be the case that msys2's builds of libcxx are on top of > libcxxabi even in the regular gcc based sysroots. > It totally is. Long time ago it was easier for me to make it work that way and haven't changed it since. ___

Re: [Mingw-w64-public] Build error with mingw-8.0.0 and gcc-11: multiple definition of `__DTOR_LIST__' / `__CTOR_LIST__

2021-01-17 Thread Mateusz Mikuła
> These are within an #ifndef HAVE_CTOR_LIST. During configure (of > mingw-w64-crt), there's an "checking whether the linker provides > __CTOR_LIST__... yes". If you're running into such an error, it sounds to > me like this test didn't produce the expected result in your case. Can you > have a

Re: [Mingw-w64-public] Build error with mingw-8.0.0 and gcc-11: multiple definition of `__DTOR_LIST__' / `__CTOR_LIST__

2021-01-17 Thread Sandro Mani
On 17.01.21 14:25, Martin Storsjö wrote: Hi, On Sun, 17 Jan 2021, Sandro Mani wrote: I'm working on updating the mingw toolchain for Fedora, and am building mingw-gcc-11 with mingw-crt-8.0.0. I'm stuck at this error when linking libgcc [1]: /usr/i686-w64-mingw32/bin/ld: