wine-staging fails to be built with gcc / mingw 11.1, looks like the maths library isn't linked Reproducible: Always
Created attachment 705255 [details] Build log xz compressed
/usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/brush.cross.o:brush.c:(.text+0x1baf): undefined reference to `sincos' /usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/factory.cross.o:factory.c:(.text+0x31ef): undefined reference to `sincos' /usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/factory.cross.o:factory.c:(.text+0x3705): undefined reference to `sincos' /usr/libexec/gcc/i686-w64-mingw32/ld: dlls/d2d1/geometry.cross.o:geometry.c:(.text+0x60b4): undefined reference to `sincos' tools/winegcc/winegcc -o dlls/d3d11/d3d11.dll --wine-objdir . -b i686-w64-mingw32 --lib-suffix=.cross.a \ -Wl,--wine-builtin -shared \ /var/tmp/portage/app-emulation/wine-staging-6.7/work/wine-6.7/dlls/d3d11/d3d11.spec -mno-cygwin \ dlls/d3d11/async.cross.o dlls/d3d11/buffer.cross.o dlls/d3d11/d3d11_main.cross.o \ dlls/d3d11/device.cross.o dlls/d3d11/inputlayout.cross.o dlls/d3d11/shader.cross.o \ dlls/d3d11/state.cross.o dlls/d3d11/texture.cross.o dlls/d3d11/utils.cross.o \ dlls/d3d11/view.cross.o dlls/d3d11/version.res dlls/dxguid/libdxguid.cross.a \ dlls/uuid/libuuid.cross.a dlls/dxgi/libdxgi.cross.a dlls/wined3d/libwined3d.cross.a \ dlls/ucrtbase/libucrtbase.cross.a collect2: error: ld returned 1 exit status winegcc: /usr/bin/i686-w64-mingw32-gcc failed make: *** [Makefile:38027: dlls/d2d1/d2d1.dll] Error 2 make: *** Waiting for unfinished jobs....
This might be related to https://bugs.gentoo.org/787662 the libraries might need to be rebuilt with gcc 11.1
Rebuilding mingw64-runtime, didn't help, neither did adding it's work around
Seems(?) to have something to do with gcc's builtins which include sincos. Guess gcc11 is doing something different in that regard (wine-vanilla also affected). So, for another temporary workaround, adding -fno-builtin to CFLAGS should let it build.
That workaround worked, cheers
Haven't been able to reproduce this since wine-staging:6.9 I'll take the liberty to mark this obsolete.