On Thursday 22 August 2024 13:24:32 Martin Storsjö wrote:
> This reverts parts of 52c98b1273a61b7a3e1fc93142fa4b5e4c3ee5ab.
> 
> While powf indeed is available in UCRT on i386 too, it's missing
> in Wine's i386 ucrtbase.dll (as of Wine 9.15). This probably stems
> from the same mistake originally. (Most of the float math functions,
> suffixed with -f, are unavailable in the i386 UCRT, but powf is
> available.)
> 
> Thus, to allow built executables to run on current Wine versions,
> avoid linking against this function, as a temporary workaround.
> 
> After a grace period, to let fixed versions of Wine become more
> widely available, we can revert this, to link against powf
> on i386 too.

Ok.

> At that point, we can stop including math/powf.c in src_ucrtbase32
> in Makefile.am too.
> 
> Signed-off-by: Martin Storsjö <[email protected]>
> ---
> A fix for Wine was submitted in
> https://gitlab.winehq.org/wine/wine/-/merge_requests/6336.

Looks like that this change does not contain fix for
api-ms-win-crt-math-l1-1-0 library.

> The change in 52c98b1273a61b7a3e1fc93142fa4b5e4c3ee5ab only
> broke an uncommon case, when linking directly against ucrtbase,
> rather than ucrt, as the commit only changed ucrtbase.def.in, but
> not api-ms-win-crt-math-l1-1-0.def.in.

I have not looked at the api-ms-win-crt-* symbols yet. This would need
to check if mingw-w64 def files matches dll libs and document
differences between different versions.

> However, rather than updating api-ms-win-crt-math-l1-1-0.def.in in
> sync with that change, revert the changes to ucrtbase.def.in (now
> ucrtbase-common.def.in) temporarily, and add comments about why
> we want to keep this marked like this, for now.
> 
> We can probably remove this Wine specific workaround after e.g.
> a year or so.
> ---
>  mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in | 2 +-
>  mingw-w64-crt/lib-common/ucrtbase-common.def.in            | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in 
> b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
> index a0e3b75ca..a63d00fb1 100644
> --- a/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
> +++ b/mingw-w64-crt/lib-common/api-ms-win-crt-math-l1-1-0.def.in
> @@ -342,7 +342,7 @@ norm
>  normf
>  norml
>  pow
> -F_NON_I386(powf)
> +F_NON_I386(powf) ; Missing in Wine's ucrtbase.dll for i386 in Wine 9.15 and 
> older
>  F_ARM_ANY(powl == pow)
>  remainder
>  remainderf
> diff --git a/mingw-w64-crt/lib-common/ucrtbase-common.def.in 
> b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
> index 4e1c87da6..69052d686 100644
> --- a/mingw-w64-crt/lib-common/ucrtbase-common.def.in
> +++ b/mingw-w64-crt/lib-common/ucrtbase-common.def.in
> @@ -2510,7 +2510,7 @@ normf
>  norml
>  perror
>  pow
> -powf
> +F_NON_I386(powf) ; Missing in Wine's ucrtbase.dll for i386 in Wine 9.15 and 
> older
>  putc
>  putchar
>  puts
> -- 
> 2.34.1
> 


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to