7571fa87df453e404d8b6ca58e2da95340156849 is the first bad commit
commit 7571fa87df453e404d8b6ca58e2da95340156849
Author: Alexandre Julliard <
julliard@winehq.org>
Date: Mon Aug 24 13:30:12 2020 +0200
makefiles: Don't implicitly import the module itself when -nodefaultlibs is used.
Signed-off-by: Alexandre Julliard <
julliard@winehq.org>
tools/makedep.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
==============
mingw build
==============
./../tools/winegcc/winegcc -o ntdll.so --wine-objdir ../.. -fno-PIC -fasynchronous-unwind-tables -munix \
-shared ntdll.spec -nodefaultlibs unix/cdrom.o unix/debug.o unix/env.o unix/file.o unix/loader.o \
unix/process.o unix/registry.o unix/security.o unix/serial.o unix/server.o unix/signal_arm.o \
unix/signal_arm64.o unix/signal_i386.o unix/signal_x86_64.o unix/sync.o unix/system.o unix/tape.o \
unix/thread.o unix/virtual.o unix/version.o ../../dlls/winecrt0/libwinecrt0.a \
../../libs/port/libwine_port.a -lwine -lpthread -L/usr/local/lib
/usr/local/bin/ld: unix/server.o: in function `interlocked_xchg64':
/home/dj/Wine/wine/dlls/ntdll/unix/server.c:124: undefined reference to `RtlInterlockedCompareExchange64'
/usr/local/bin/ld: unix/server.o: in function `get_cached_fd':
/home/dj/Wine/wine/dlls/ntdll/unix/server.c:946: undefined reference to `RtlInterlockedCompareExchange64'
collect2: error: ld returned 1 exit status
The RtlInterlockedCompareExchange64() function is only defined in large_int.c, but that's not listed in the object files to link to, nor can it be, because the unix library uses GCC but ntdll uses mingw.
==============
gcc9 build
==============
../../tools/winegcc/winegcc -o ntdll.so --wine-objdir ../.. -fno-PIC -fasynchronous-unwind-tables -munix \
-shared ntdll.spec -nodefaultlibs unix/cdrom.o unix/debug.o unix/env.o unix/file.o unix/loader.o \
unix/process.o unix/registry.o unix/security.o unix/serial.o unix/server.o unix/signal_arm.o \
unix/signal_arm64.o unix/signal_i386.o unix/signal_x86_64.o unix/sync.o unix/system.o unix/tape.o \
unix/thread.o unix/virtual.o unix/version.o ../../dlls/winecrt0/libwinecrt0.a \
../../libs/port/libwine_port.a -lwine -lpthread -L/usr/local/lib
/usr/local/bin/ld: unix/server.o: in function `interlocked_xchg64':
/home/dj/Wine/wine/dlls/ntdll/unix/server.c:124: undefined reference to `RtlInterlockedCompareExchange64'
/usr/local/bin/ld: unix/server.o: in function `get_cached_fd':
/home/dj/Wine/wine/dlls/ntdll/unix/server.c:946: undefined reference to `RtlInterlockedCompareExchange64'
collect2: error: ld returned 1 exit status
If I add "large_int.o" to that command, it links, and completes the entire build successfully.
It's unclear how these would work even on Linux.
Damjan