Re: [Mingw-w64-public] [PATCH 1/2] crt: Add wsmsvc to all architectures

2023-12-19 Thread Martin Storsjö

On Wed, 13 Dec 2023, Mark Harmstone wrote:


Signed-off-by: Mark Harmstone 
---
mingw-w64-crt/lib-common/wsmsvc.def | 3675 +++
mingw-w64-crt/lib32/Makefile.am |1 +
mingw-w64-crt/lib32/wsmsvc.def  | 3673 ++
mingw-w64-crt/lib64/Makefile.am |1 +
mingw-w64-crt/libarm64/Makefile.am  |1 +
5 files changed, 7351 insertions(+)
create mode 100644 mingw-w64-crt/lib-common/wsmsvc.def
create mode 100644 mingw-w64-crt/lib32/wsmsvc.def


The lib32 version of this def file contains some stray comments, looking 
like the demangled function names, which break building it with 
llvm-dlltool. See e.g. lines that look like this:


?ClearSubKeys@@YGHPAUHKEY__@@PAVIRequestContext@@@Z (int __stdcall 
ClearSubKeys(struct HKEY__ *,class IRequestContext *))

Other than that, I guess this particular patch seems fine.

// Martin



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 1/2] crt: Add wsmsvc to all architectures

2023-12-13 Thread Martin Storsjö

On Thu, 14 Dec 2023, Mark Harmstone wrote:


On 13/12/23 09:06, Martin Storsjö wrote:

On Wed, 13 Dec 2023, Mark Harmstone wrote:


Signed-off-by: Mark Harmstone 
---
mingw-w64-crt/lib-common/wsmsvc.def | 3675 +++
mingw-w64-crt/lib32/Makefile.am |    1 +
mingw-w64-crt/lib32/wsmsvc.def  | 3673 ++
mingw-w64-crt/lib64/Makefile.am |    1 +
mingw-w64-crt/libarm64/Makefile.am  |    1 +
5 files changed, 7351 insertions(+)
create mode 100644 mingw-w64-crt/lib-common/wsmsvc.def
create mode 100644 mingw-w64-crt/lib32/wsmsvc.def


Note that we do have a version of this def file already, for arm32 only.

As we're adding one version in lib-common and reusing it for arm64, I 
wonder if we should reuse/share it for arm32 as well? Are there many 
differences between these symbols between x86_64 and i386, or between 
x86_64 and arm32? Depending on that, we should either keep all 4 separate 
(I can generate ones for all 4 architectures by dumping DLLs, but if we 
generate it from import libraries you should be able to do it yourself as 
well), or share them more than this.


Thanks Martin. Yes, I should have pointed out that this was deliberate. It 
looks like the MSVC name mangling is slightly different between arm32 and 
i386 (but the same for x86_64 and arm64).


Oh, I see. That's slightly surprising, but apparently that's what it is 
then. Yeah, mentioning it in the commit message might be good.


On the other hand, I wonder how much utility there is to this at all - as 
no mingw tools really can use the MSVC C++ ABI anyway, so is it worth 
adding this at all? (Or should we add it as a stub, empty def file?)


Well, there is that. It's worth adding wsmsvc though, as there's some C 
symbols right at the end.


Oh, I didn't notice that. Then I guess it's at least somewhat usable.

I would rather like to add support for MSVC name mangling to GCC one day, but 
I suspect it'd be quite a big job...


FWIW, just supporting the name mangling isn't very helpful in the end; 
you'd need to support the whole MSVC C++ ABI more or less, in order to 
make it useful. Clang does support that, but one can't pick and choose 
ABI/mangling per class, but you'd switch entirely between MSVC and mingw 
mode per compilation unit. (There is actually a 
-fc++-abi={itanium,microsoft} option that one can use to switch the C++ 
ABI separately from the overall target/mode, but I don't think it's 
practically tested to mix MSVC C++ with mingw in that way.)


// Martin

___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 1/2] crt: Add wsmsvc to all architectures

2023-12-13 Thread Mark Harmstone

On 13/12/23 09:06, Martin Storsjö wrote:

On Wed, 13 Dec 2023, Mark Harmstone wrote:


Signed-off-by: Mark Harmstone 
---
mingw-w64-crt/lib-common/wsmsvc.def | 3675 +++
mingw-w64-crt/lib32/Makefile.am |    1 +
mingw-w64-crt/lib32/wsmsvc.def  | 3673 ++
mingw-w64-crt/lib64/Makefile.am |    1 +
mingw-w64-crt/libarm64/Makefile.am  |    1 +
5 files changed, 7351 insertions(+)
create mode 100644 mingw-w64-crt/lib-common/wsmsvc.def
create mode 100644 mingw-w64-crt/lib32/wsmsvc.def


Note that we do have a version of this def file already, for arm32 only.

As we're adding one version in lib-common and reusing it for arm64, I wonder if 
we should reuse/share it for arm32 as well? Are there many differences between 
these symbols between x86_64 and i386, or between x86_64 and arm32? Depending 
on that, we should either keep all 4 separate (I can generate ones for all 4 
architectures by dumping DLLs, but if we generate it from import libraries you 
should be able to do it yourself as well), or share them more than this.


Thanks Martin. Yes, I should have pointed out that this was deliberate. It 
looks like the MSVC name mangling is slightly different between arm32 and i386 
(but the same for x86_64 and arm64).


On the other hand, I wonder how much utility there is to this at all - as no 
mingw tools really can use the MSVC C++ ABI anyway, so is it worth adding this 
at all? (Or should we add it as a stub, empty def file?)


Well, there is that. It's worth adding wsmsvc though, as there's some C symbols 
right at the end.
I would rather like to add support for MSVC name mangling to GCC one day, but I 
suspect it'd be quite a big job...

Mark


___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [PATCH 1/2] crt: Add wsmsvc to all architectures

2023-12-13 Thread Martin Storsjö

On Wed, 13 Dec 2023, Mark Harmstone wrote:


Signed-off-by: Mark Harmstone 
---
mingw-w64-crt/lib-common/wsmsvc.def | 3675 +++
mingw-w64-crt/lib32/Makefile.am |1 +
mingw-w64-crt/lib32/wsmsvc.def  | 3673 ++
mingw-w64-crt/lib64/Makefile.am |1 +
mingw-w64-crt/libarm64/Makefile.am  |1 +
5 files changed, 7351 insertions(+)
create mode 100644 mingw-w64-crt/lib-common/wsmsvc.def
create mode 100644 mingw-w64-crt/lib32/wsmsvc.def


Note that we do have a version of this def file already, for arm32 only.

As we're adding one version in lib-common and reusing it for arm64, I 
wonder if we should reuse/share it for arm32 as well? Are there many 
differences between these symbols between x86_64 and i386, or between 
x86_64 and arm32? Depending on that, we should either keep all 4 separate 
(I can generate ones for all 4 architectures by dumping DLLs, but if we 
generate it from import libraries you should be able to do it yourself as 
well), or share them more than this.


On the other hand, I wonder how much utility there is to this at all - as 
no mingw tools really can use the MSVC C++ ABI anyway, so is it worth 
adding this at all? (Or should we add it as a stub, empty def file?)


// Martin



___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public