Compiling with ABI_X86="32" works, but whenever I use ABI_X86="64" or ABI_X86="32 64", the build fails with the same error at the exactly same point: x86_64-pc-linux-gnu-gcc -m64 -c -o dllfunc.o /var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/strmbase/dllfunc.c \ -I. -I/var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/strmbase -I../../include \ -I/var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/include -D__WINESRC__ -D_REENTRANT \ -fPIC -Wall -pipe -fno-tree-loop-distribute-patterns -fno-strict-aliasing \ -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers -Wno-packed-not-aligned \ -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits -Wunused-but-set-parameter -Wvla \ -Wwrite-strings -Wpointer-arith -Wlogical-op -march=native -mtune=native -O2 -m64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 during RTL pass: pro_and_epilogue /var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/dxerr9/dxerr9.c: In function 'DXTraceA': /var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/dxerr9/dxerr9.c:139:1: internal compiler error: in choose_baseaddr, at config/i386/i386.c:12194 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <https://bugs.gentoo.org/> for instructions. during RTL pass: pro_and_epilogue /var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/dxerr8/dxerr8.c: In function 'DXTraceA': /var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1/dlls/dxerr8/dxerr8.c:135:1: internal compiler error: in choose_baseaddr, at config/i386/i386.c:12194 } ^ make[1]: *** [Makefile:168: dxerr9.o] Error 1 make[1]: Leaving directory '/var/tmp/portage/app-emulation/wine-any-4.1/work/wine-4.1-abi_x86_64.amd64/dlls/dxerr9' make: *** [Makefile:8444: dlls/dxerr9] Error 2 make: *** Waiting for unfinished jobs.... Full build.log attached. The machine has 32GB RAM, so it doesn't run out of memory. I tried with MAKEOPTS="-j1" and CFLAGS -O1 and -O0 too, without succes.
Created attachment 574498 [details] emerge --info
Created attachment 574500 [details] build log
Forgot to mention: gcc --version gcc (Gentoo 8.3.0-r1 p1.1) 8.3.0
Looks like a compiler bug, not sure what I can do
I installed and switched to the latest gcc-7 (gcc-7.4.0-r1) and wine compiles without an error. I then remembered an old userpatch for gcc lying around (from 2016) which was somehow needed at that time: --- trunk/gcc/config/i386/i386.c 2016/01/06 20:13:19 232110 +++ trunk/gcc/config/i386/i386.c 2016/01/06 20:19:04 232111 @@ -13065,6 +13065,8 @@ m->fs.fp_valid = true; } + m->fs.sp_valid = !frame_pointer_needed; + if (!int_registers_saved) ix86_emit_save_regs_using_mov (frame.reg_save_offset); if (!sse_registers_saved) Removing this patch and recompiling gcc-8.3.0 solved the problem and wine compiles without that error with gcc-8.3.0 too, so this is solved. Sorry for the inconvenience.