On Fri Nov 28 16:47:57 2025 +0000, Jacek Caban wrote:
Sorry for the delay. My main concern is that those decisions are made at Wine build time, yet we don't know how the resulting static libraries will be used. For all we know, a Wine built with GCC might be used with `winegcc` for Clang/MSVC-style builds and things would mostly work. There are subtle differences that won't, and as we extend the CRT it will become harder to maintain conditionals like these, so it'd be nice to avoid `#ifdef`s here where possible. In this particular case, the `#ifdef` also doesn’t match how the mingw CRT behaves. The mingw CRT supports `.CRT` sections, so from the CRT point of view both GCC-style and MSVC-style constructors work. This becomes even more important for TLS constructors, which I believe only work with `.CRT` sections. Always supporting `.CRT` should be straightforward, but doing the same for `__CTOR_LIST__` is trickier because it’s undefined in MSVC mode. We could maybe provide a fallback using weak symbols, I'm not sure without trying. My question was mostly in hope that we can ignore `__CTOR_LIST__` for the first iteration and just get the `.CRT` support right. Alright I will do some experiments with weak symbols on mingw, if that doesn't work out I'll drop gcc ctor/dtor list support for now.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9265#note_124044