winegcc -m32 -mno-cygwin not working
Description:
When I create a empty main program:
int main(int argc, char* argv[]) {return 0;}
And compile it via winegcc -m32 -mno-cygwin
I get following error:
/usr/bin/ld: /usr/bin/../lib32/wine/i386-unix/libucrtbase.a(crt_main.o): direct GOT relocation R_386_GOT32X against `_configure_narrow_argv' without base register can not be used when making a shared object
When I compile wine manually and use this libucrtbase.a then the error does not show up so I guess it has something to do with how this package is compiled.
I don't know if it helps but I tried to compare how a file is compiled on my system:
gcc -m32 -c -o dlls/ucrtbase/printf.o dlls/ucrtbase/printf.c -Idlls/ucrtbase -Idlls/msvcrt -Iinclude -Iinclude/msvcrt
-D_UCRT -D__WINESRC__ -D_CRTIMP= -Wall -pipe -fcf-protection=none -fvisibility=hidden
-fno-stack-protector -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers -Winit-self -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes
-Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wno-misleading-indentation
-Wpointer-arith -Wlogical-op -gdwarf-4 -fno-PIC -fasynchronous-unwind-tables -D_WIN32 -fno-builtin
-fshort-wchar -Wno-format -fno-omit-frame-pointer -g -O2
vs the same file compiled when building this package:
i686-w64-mingw32-gcc -c -o dlls/ucrtbase/i386-windows/printf.o ../wine/dlls/ucrtbase/printf.c -Idlls/ucrtbase -I../wine/dlls/ucrtbase
-I../wine/dlls/msvcrt -Iinclude -I../wine/include -I../wine/include/msvcrt -D_UCRT -D__WINESRC__
-D_CRTIMP= -D__WINE_PE_BUILD -Wall -fno-strict-aliasing -Wdeclaration-after-statement -Wempty-body
-Wignored-qualifiers -Winit-self -Wno-packed-not-aligned -Wshift-overflow=2 -Wstrict-prototypes
-Wtype-limits -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith -Wlogical-op
-Wabsolute-value -Wenum-conversion -Wno-misleading-indentation -fno-omit-frame-pointer
-mpreferred-stack-boundary=2 -fno-builtin -O2 -pipe
Additional info:
- package version(s): wine 9.9-2
Steps to reproduce:
See description. In short. Create a main.c and try to compile it with winegcc -m32 -mno-cygwin main.c