Re: [Mingw-w64-public] Merging lib32/*.def and lib-common/*.def files?

2024-12-12 Thread LIU Hao
在 2024-12-12 03:20, Pali Rohár 写道: If you are open for this idea, that it is not totally stupid thing (I was not sure that is why I opened this discussion before trying to implement anything) I can try to prepare some PoC patch. Seriously, I think we can generate a DEF file by parsing the outpu

Re: [Mingw-w64-public] Question about wdmsec

2024-12-12 Thread Martin Storsjö
On Thu, 12 Dec 2024, Johannes Khoshnazar-Thoma wrote: Hi Martin, Hi List, Am 27.11.24 um 12:40 schrieb Johannes Khoshnazar-Thoma: Hi Martin Storsjö, Am 22.11.24 um 13:13 schrieb Martin Storsjö: > > This patch was approved and merged now (after some discussion and some tweaks to > the im

Re: [Mingw-w64-public] [PATCH 1/3] headers: Treat __MSVCRT_VERSION__=0x600 as compiling for msvcrt.dll ABI

2024-12-12 Thread Martin Storsjö
On Thu, 12 Dec 2024, LIU Hao wrote: 在 2024-12-12 21:17, Martin Storsjö 写道: On Thu, 28 Nov 2024, Pali Rohár wrote: msvcrt.dll preinstalled as part of the Windows system provides more functions than the original Visual C++ 6.0, but still it is compatible with the original version. So setting __

Re: [Mingw-w64-public] [PATCH 2/2] headers: Declare debug _CRTDBG_MAP_ALLOC macros

2024-12-12 Thread Martin Storsjö
On Thu, 12 Dec 2024, LIU Hao wrote: 在 2024-12-12 21:31, Martin Storsjö 写道: Interesting idea. But it is better than the explicit undefining of malloc macro? The advantage of pragma solution is that it contains explicit "#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)" guard which describe why

Re: [Mingw-w64-public] [PATCH 1/3] headers: Define ARM64EC target identification macros

2024-12-12 Thread Jacek Caban
On 12.12.2024 15:08, LIU Hao wrote: 在 2024-12-12 21:41, Jacek Caban 写道: From: Billy Laws ARM64EC targets are identified by the __arm64ec__, _M_ARM64EC, and _ARM64EC_ macros. ARM64EC code functions as an __x86_64__ compiler while utilizing the AArch64 instruction set. Consequently, it defi

Re: [Mingw-w64-public] Question about wdmsec

2024-12-12 Thread Johannes Khoshnazar-Thoma
Hi Martin, Hi List, Am 27.11.24 um 12:40 schrieb Johannes Khoshnazar-Thoma: Hi Martin Storsjö, Am 22.11.24 um 13:13 schrieb Martin Storsjö: > > This patch was approved and merged now (after some discussion and some tweaks to > the implementation), see > https://sourceware.org/git/?p=binut

Re: [Mingw-w64-public] [PATCH 1/3] headers: Treat __MSVCRT_VERSION__=0x600 as compiling for msvcrt.dll ABI

2024-12-12 Thread LIU Hao
在 2024-12-12 21:17, Martin Storsjö 写道: On Thu, 28 Nov 2024, Pali Rohár wrote: msvcrt.dll preinstalled as part of the Windows system provides more functions than the original Visual C++ 6.0, but still it is compatible with the original version. So setting __MSVCRT_VERSION__ to 0x600 for msvcrt.dl

Re: [Mingw-w64-public] [PATCH 2/2] headers: Declare debug _CRTDBG_MAP_ALLOC macros

2024-12-12 Thread LIU Hao
在 2024-12-12 21:31, Martin Storsjö 写道: Interesting idea. But it is better than the explicit undefining of malloc macro? The advantage of pragma solution is that it contains explicit "#if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)" guard which describe why it is needed. Parenthesis solution aro

Re: [Mingw-w64-public] [PATCH 1/3] headers: Define ARM64EC target identification macros

2024-12-12 Thread LIU Hao
在 2024-12-12 21:41, Jacek Caban 写道: From: Billy Laws ARM64EC targets are identified by the __arm64ec__, _M_ARM64EC, and _ARM64EC_ macros. ARM64EC code functions as an __x86_64__ compiler while utilizing the AArch64 instruction set. Consequently, it defines the __x86_64__, _M_AMD64, and _AMD

[Mingw-w64-public] [PATCH 3/3] headers: Use the aarch64 asm variant for __prefetch on ARM64EC

2024-12-12 Thread Jacek Caban
From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/crt/_mingw.h.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in index 085d56ff5..9b586f67d 100644 --- a/mingw-w64-headers/crt/_mingw.

[Mingw-w64-public] [PATCH 2/3] headers: Use the aarch64 asm variant for debug breaks on ARM64EC

2024-12-12 Thread Jacek Caban
From: Billy Laws Signed-off-by: Jacek Caban --- mingw-w64-headers/crt/_mingw.h.in | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in index bc6a3afd3..085d56ff5 100644 --- a/mingw-w64-headers/

[Mingw-w64-public] [PATCH 1/3] headers: Define ARM64EC target identification macros

2024-12-12 Thread Jacek Caban
From: Billy Laws ARM64EC targets are identified by the __arm64ec__, _M_ARM64EC, and _ARM64EC_ macros. ARM64EC code functions as an __x86_64__ compiler while utilizing the AArch64 instruction set. Consequently, it defines the __x86_64__, _M_AMD64, and _AMD64_ macros, but not __aarch64__, _

Re: [Mingw-w64-public] [PATCH 2/2] headers: Declare debug _CRTDBG_MAP_ALLOC macros

2024-12-12 Thread Martin Storsjö
On Wed, 4 Dec 2024, Pali Rohár wrote: On Wednesday 04 December 2024 14:51:34 LIU Hao wrote: 在 2024-12-04 04:17, Pali Rohár 写道: It allowed me to compile application in debug mode with msvcrtd.dll memory leak detector and then run it. It was compiled in the same way via gcc and msvc. I do not k

Re: [Mingw-w64-public] [PATCH 1/3] headers: Treat __MSVCRT_VERSION__=0x600 as compiling for msvcrt.dll ABI

2024-12-12 Thread Martin Storsjö
On Thu, 28 Nov 2024, Pali Rohár wrote: In commit 797b4a6b5191 ("headers: Expose the wchar ctype _l functions for msvcrt.dll for Vista") was added following pattern: #if __MSVCRT_VERSION__ >= 0x800 || (__MSVCRT_VERSION__ == 0x700 && _WIN32_WINNT >= 0x0600) /* These are available since m

Re: [Mingw-w64-public] [PATCH 3/3] headers: Fix configure --with-default-msvcrt=msvcr40d

2024-12-12 Thread Martin Storsjö
On Thu, 28 Nov 2024, Pali Rohár wrote: In mingw-w64-headers/configure.ac is missing case for the msvcr40d. It is missing because all CRT debug libraries in all versions except for VC++4.0, have just appended letter "d" after the release name. VC++ 4.0 CRT debug library is exception, the release

Re: [Mingw-w64-public] [PATCH 1/6] crt: Fix __getmainargs() and __wgetmainargs() ABI for msvcrt40.dll and msvcrt.dll

2024-12-12 Thread Martin Storsjö
On Tue, 10 Dec 2024, LIU Hao wrote: 在 2024-11-28 01:33, Pali Rohár 写道: +{ + /* + * ABI of msvcrt.dll __getmainargs() function was changed in Windows XP. + * In Windows 2000 and older versions of msvcrt.dll, including the original + * Visual C++ 6.0 msvcrt.dll version, __getmainargs() ha