https://bugs.winehq.org/show_bug.cgi?id=49437
--- Comment #10 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Sean C. Farley from comment #9)
Created attachment 67895 [details] gdb output of segfault
I compiled with gcc v9.3.0 and installed Wine v5.14 manually with debugging (-ggdb3) to see if I could figure out what is happening. Here is the trace of it crashing at the start of __wine_process_init() in dlls/ntdll/loader.c. This is the same crash whether it is i386 or amd64 for me. This trace is the amd64 build.
Configuration was this: CC=gcc9 CXX=g++9 LDFLAGS="-ggdb3 -Wl,-rpath=/usr/local/lib/gcc9 -L/usr/local/lib/gcc9" CFLAGS="-ggdb3 -pipe -Wl,-rpath=/usr/local/lib/gcc9 -isystem /usr/local/include" ./configure --verbose --with-oss --with-x --with-cms --with-fontconfig --with-freetype --with-glu --with-jpeg --with-opengl --with-png --with-xinerama --with-xinput2 --with-xrandr --with-xrender --enable-win64 --libdir=/tmp/wine/local/lib --x-libraries=/usr/local/lib --x-includes=/usr/local/include --prefix=/tmp/wine/local
Please post the contents of your /proc/PID/map when that breakpoint gets hit, so we can compare the address in your kernel32_start_process variable against those address ranges.
Side note: I was unable to get the system clang (v10.0.1) so used the compiler that the port uses to compile wine.
Clang hasn't worked for building Wine properly, for quite a while ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231010).
Also there is some other notes in that bug report, such as WITH_DEBUG breaking Wine in a similar way to what you're seeing.