Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread LIU Hao
在 2022-12-24 06:14, Pali Rohár 写道: I just quickly tested it only in wine. Without LTO it prints "ł$" (really strange, looks like some memory problem, maybe in wine?). Oops, sorry forgot that the callback for `__cxa_thread_atexit` should be specified with `__cdecl`, otherwise its argument (the

Re: [Mingw-w64-public] [PATCH] headers: Use Windows 10 as default _WIN32_WINNT value.

2022-12-23 Thread Jeremy Drake via Mingw-w64-public
On Sat, 24 Dec 2022, LIU Hao wrote: > The only issue in this thread seems to be inside GNU lib because it relies on > the default value. That's probably not good; however, given GNU lib users are > less likely to be aware of this Windows-specific macro, maybe we can propose > GNU lib should set a

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread Pali Rohár
On Saturday 24 December 2022 03:17:57 LIU Hao wrote: > 在 2022-12-24 01:43, Pali Rohár 写道: > > Ou right. They would also require __attribute__((used)) for LTO builds. > > I just tested simple single process/thread console applications and they > > worked. > > > > Do you have any test case applicati

Re: [Mingw-w64-public] [PATCH] headers: Use Windows 10 as default _WIN32_WINNT value.

2022-12-23 Thread LIU Hao
在 2022-12-24 01:48, Jeremy Drake via Mingw-w64-public 写道: I recently discovered that llvm's libc++ has something similar. MSYS2 recently bumped their default _WIN32_WINNT to Windows 8.1, and the libc++ built after that no longer worked on Windows 7. I was of the understanding that that macro wa

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread LIU Hao
在 2022-12-24 01:43, Pali Rohár 写道: Ou right. They would also require __attribute__((used)) for LTO builds. I just tested simple single process/thread console applications and they worked. Do you have any test case application which would be affected if these symbols are eliminated? Does this p

Re: [Mingw-w64-public] [PATCH] headers: Use Windows 10 as default _WIN32_WINNT value.

2022-12-23 Thread Jeremy Drake via Mingw-w64-public
On Fri, 23 Dec 2022, Roger Pack wrote: > Ran into this. > According to > https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170 > "The preprocessor macros WINVER and _WIN32_WINNT specify the minimum > operating system version your code supports." > > Anyway,

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread Pali Rohár
On Saturday 24 December 2022 01:00:59 LIU Hao wrote: > 在 2022-12-24 00:18, Pali Rohár 写道: > > What is the reason? Maybe it was gcc/ld bug which this patch workarounds? > > > > Generally speaking, all variables that are required to be placed in special > sections to take effect, but are not otherw

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread LIU Hao
在 2022-12-24 00:18, Pali Rohár 写道: What is the reason? Maybe it was gcc/ld bug which this patch workarounds? Generally speaking, all variables that are required to be placed in special sections to take effect, but are not otherwise referenced, are likely to be affected by LTO, and have to be

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-12-23 Thread Pali Rohár
On Friday 23 December 2022 22:20:25 LIU Hao wrote: > 在 2022-12-04 21:49, Pali Rohár 写道: > > Format attributes is interesting issue. Because there are already following > > printf implementations: > > > > 1) C89 (without %lld) (crtdll.dll, msvcrt10.dll) > > 2) C89 (without %lld) + MS extensions %I6

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread Pali Rohár
On Friday 23 December 2022 22:25:57 LIU Hao wrote: > 在 2022-12-21 21:00, Martin Storsjö 写道: > > > > I believe this patch should be harmless; for regular object file based > > linking, __attribute__((used)) shouldn't have any effect across object > > file boundaries (it only affects what's emitted

Re: [Mingw-w64-public] [PATCH] crt: Fix building LTO version of mingw-w64 crt libraries

2022-12-23 Thread LIU Hao
在 2022-12-21 21:00, Martin Storsjö 写道: I believe this patch should be harmless; for regular object file based linking, __attribute__((used)) shouldn't have any effect across object file boundaries (it only affects what's emitted and what's optimized out from within each object file). And for L

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add non-inline variant of UCRT _scprintf, _snprintf and _snscanf functions

2022-12-23 Thread LIU Hao
在 2022-12-04 21:49, Pali Rohár 写道: Format attributes is interesting issue. Because there are already following printf implementations: 1) C89 (without %lld) (crtdll.dll, msvcrt10.dll) 2) C89 (without %lld) + MS extensions %I64d (msvcrt20.dll - msvcr110.dll) 3) C99 (with %lld) + MS extensions %I6

Re: [Mingw-w64-public] [PATCH] genstubdll: Remove

2022-12-23 Thread LIU Hao
在 2022-12-22 02:04, Jacek Caban 写道: Removal seems good to me. Thanks. Pushed to master now. -- Best regards, LIU Hao OpenPGP_signature Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.n

Re: [Mingw-w64-public] [PATCH] headers: Use Windows 10 as default _WIN32_WINNT value.

2022-12-23 Thread Roger Pack
On Sat, Dec 26, 2020 at 6:41 AM Jacek Caban wrote: > > Signed-off-by: Jacek Caban > --- > > I think it's reasonable to assume that the current default value of > Windows XP does not reflect reality. The new value deserves some > considerations. I propose to go all the way to Windows 10 and match