Hi Sandro & all

On Fri, Jan 14, 2022 at 6:03 PM Sandro Mani <manisan...@gmail.com> wrote:
>
> Hi Marc
>
> On my part, feel free to give it a shot. To be honest personally I don't
> really know enough about UCRT to judge the consequences.
>

I managed to bootstrap a ucrt toolchain on fedora:

$ x86_64-w64-mingw32ucrt-gcc test.c

$ /usr/bin/mingw-objdump -p a.exe | grep DLL
 vma:            Hint    Time      Forward  DLL       First
    DLL Name: KERNEL32.dll
    DLL Name: api-ms-win-crt-time-l1-1-0.dll
    DLL Name: api-ms-win-crt-math-l1-1-0.dll
    DLL Name: api-ms-win-crt-runtime-l1-1-0.dll
    DLL Name: api-ms-win-crt-environment-l1-1-0.dll
    DLL Name: api-ms-win-crt-private-l1-1-0.dll
    DLL Name: api-ms-win-crt-heap-l1-1-0.dll
    DLL Name: api-ms-win-crt-locale-l1-1-0.dll
    DLL Name: api-ms-win-crt-stdio-l1-1-0.dll
    DLL Name: api-ms-win-crt-string-l1-1-0.dll

$ wine ./a.exe
002c:fixme:winediag:LdrInitializeThunk wine-staging 7.0-rc4 is a
testing version containing experimental patches.
002c:fixme:winediag:LdrInitializeThunk Please mention your exact
version when filing bug reports on winehq.org.
hello

The common tool / package prefix I picked is ucrt64- (copy/replace of mingw64-).

I had to pick a target triple for sys-root and binary prefix. My
initial idea was x86_64-w64-ucrt. Unfortunatly, this doesn't pass
config.sub checks, which has a fixed set of OS patterns. So I picked
x86_64-w64-mingw32ucrt. Does that sound reasonable? Given that
-lmingw32 is still used, I think that makes sense... Who should we ask
for opinions, or if we are doing something wrong here?

This is the order of package build & install I followed:
- filesystem
- binutils
- headers + threads
- gcc bootstrap
- crt
- headers - threads (had to tweak temporarily Require: winpthread here..)
- winpthreads (seems necessary for gcc libs nowadays), with ssp flags disabled
- gcc
- winpthreads
- gcc gomp=1

The forks:
https://src.fedoraproject.org/forks/elmarco/rpms/mingw-filesystem.git
ucrt branch
https://src.fedoraproject.org/forks/elmarco/rpms/mingw-bintuils.git ucrt branch
https://src.fedoraproject.org/forks/elmarco/rpms/mingw-headers.git ucrt branch
https://src.fedoraproject.org/forks/elmarco/rpms/mingw-gcc.git ucrt branch
https://src.fedoraproject.org/forks/elmarco/rpms/mingw-winpthreads.git
ucrt branch

Any comments? How to proceed next?

Thanks!

> Regarding mingw32, I think the discussion came up some time ago when I
> proposed changing the mingw32 exception model to be able to build rust.
> If memory serves me right, there were still some use-cases for mingw32,
> perhaps mingw-gecko/wine? Michael can you add more maybe?
>
> Thanks
> Sandro
>
> On 14.01.22 14:32, Marc-André Lureau wrote:
> > Hi Sandro & list,
> >
> > UCRT seems to be the recommended C runtime for a bit more than 2 years
> > now. It solves issues with utf8, C standard, interop with MSVC etc.
> >
> > Do we have plans to start adding that target? Apparently we would need
> > a new target prefix ucrt64-, and compile crt/headers
> > --with-default-msvcrt=ucrt64 etc. I could eventually give it a shot.
> >
> > Regarding long-term plans, should we plan to drop 32 bit targets? it's
> > a niche nowadays.
> >
> > thanks
> >
>
_______________________________________________
mingw mailing list -- mingw@lists.fedoraproject.org
To unsubscribe send an email to mingw-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/mingw@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to