Created attachment 677155 [details]
x86_64-pc-linux-gnu-gcc -m32 -c -o mkstemps.o /var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/libs/port/mkstemps.c \
-I. -I/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/libs/port -I../../include \
-I/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2/include -D__WINESRC__ \
-D_REENTRANT -fno-PIC -Wall -pipe -fno-tree-loop-distribute-patterns -fcf-protection=none \
-fno-stack-protector -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 \
-fno-omit-frame-pointer -march=x86-64 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mno-sgx -mbmi2 -mno-pconfig -mno-wbnoinvd -mno-tbm -mavx -mavx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-avx5124fmaps -mno-avx5124vnniw -mno-clwb -mno-mwaitx -mno-clzero -mno-pku -mno-rdpid -mno-gfni -mno-shstk -mno-avx512vbmi2 -mno-avx512vnni -mno-vaes -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b -mno-waitpkg -mno-cldemote -mno-ptwrite --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=4096 -mtune=haswell -O2 -fno-reorder-blocks -pipe -ggdb3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../libs/port/libwine_port.a(mkstemps.o): warning: relocation in read-only section `.text'
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: ../../libs/port/libwine_port.a(mkstemps.o): direct GOT relocation R_386_GOT32 against `strlen@@GLIBC_2.0' without base register can not be used when making a shared object
/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make: *** [Makefile:222: winegcc] Error 1
make: Leaving directory '/var/tmp/portage/app-emulation/wine-vanilla-5.0.2/work/wine-5.0.2-abi_x86_32.x86/tools/winegcc'
This is a regression: 4.0.3 builds fine.
Can't reproduce so far.
Could you include your 'emerge --info'?
Also, I see 'custom-cflags'. Does this happen with that flag disabled as well?
Created attachment 677575 [details]
Created attachment 677578 [details]
build log w/o custom-cflags
USE=-custom-cflags had the same problem (see attached build log)
It seems WINE is intentionally turning off PIC for 32-bit builds, and the x86_64 linker is enforcing it being required despite -m32. (IIRC, x86_32 doesn't require PIC for shared libs, while x86_64 does)
FWIW I have binutils 2.34-r2 at the moment
Is this still reproducible with in-tree versions?
Hitting this with app-emulation/wine-vanilla-6.0.1 on amd64
Still an issue with 6.0.2.
Also noted that all working versions have been pruned from the tree...
I just tried building 6.0.2 mirroring your CFLAGS and USE-flags mostly as much as I can, but still could not hit the error...
If I find the time and energy for it at some point, I'll try building a test install using the hardened profile and further align with your set-up.
Could you upload a new 'emerge --info' and build log even if they seem identical to the year-old ones.
This binutils change might be related: https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=30a954525f4e53a9cd50a1a8a6f201c7cf6595c7.
Created attachment 775080 [details]
7.0 build log
build log from 7.0 (still affected)
Created attachment 775083 [details]
Updated emerge --info
Can you repro with in-tree versions of wine or binutils?
(In reply to Nick Sarnie from comment #12)
> Can you repro with in-tree versions of wine or binutils?
This has only ever been with in-tree versions...
(In reply to Luke-Jr from comment #13)
> (In reply to Nick Sarnie from comment #12)
> > Can you repro with in-tree versions of wine or binutils?
> This has only ever been with in-tree versions...
That doesn't make much sense given you originally posted this in December 2020. Nick is asking if you can reproduce still this with the latest versions in tree, or at least things still in tree. i.e. Is it still relevant?
(In reply to Sam James from comment #14)
> (In reply to Luke-Jr from comment #13)
> > (In reply to Nick Sarnie from comment #12)
> > > Can you repro with in-tree versions of wine or binutils?
> > This has only ever been with in-tree versions...
> That doesn't make much sense given you originally posted this in December
> 2020. Nick is asking if you can reproduce still this with the latest
> versions in tree, or at least things still in tree. i.e. Is it still
Already confirmed it is still relevant less than a month ago: https://bugs.gentoo.org/758914#c10
Nothing in the diff for -r2 indicates it's worth re-testing.
Thanks, as the issue seems to be related to binutils and the linked upstream bug was fixed in the past few months, I thought maybe a recent gentoo version bump of binutils might have fixed it.