Sadly, after being fine for those two months since
commit 0c14b1a962573ee125940f2008c646befe597226 Author: Gerald Pfeifer gerald@pfeifer.com Date: Sun Jun 7 00:38:02 2020 +0200
ntdll: Replicate InterlockedCompareExchange64 to the Unix library.
This fixes the build on FreeBSD/i386 with GCC 9.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com Signed-off-by: Alexandre Julliard julliard@winehq.org
went in, this is now broken again with GCC 9. It broke between Wine 5.15 and 5.16.
Alexandre, does the following ring a bell?
gcc9 -c -o enum_jobs.o enum_jobs.c -I. -I../../include -I../../include/msvcrt -D __WINESRC__ -D_UCRT -D_REENTRANT -fno-PIC -fasynchronous-unwind-tables -fno-builtin -fshort-wchar -Wall -pipe -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 -isystem /home/gerald/11-i386/include -O2 -pipe -fstack-protector-strong -Wl,-rpath=/home/gerald/11-i386/lib/gcc9 -isystem /home/gerald/11-i386/include -fno-strict-aliasing unix/server.o: In function `remove_fd_from_cache': server.c:(.text+0x2d0): undefined reference to `RtlInterlockedCompareExchange64' unix/server.o: In function `add_fd_to_cache': server.c:(.text+0x5da): undefined reference to `RtlInterlockedCompareExchange64' unix/server.o: In function `server_get_unix_fd': server.c:(.text+0xae3): undefined reference to `RtlInterlockedCompareExchange64' server.c:(.text+0xc00): undefined reference to `RtlInterlockedCompareExchange64' collect2: error: ld returned 1 exit status winegcc: /home/gerald/11-i386/bin/gcc9 failed gmake[2]: *** [Makefile:1454: ntdll.so] Error 2
Gerald
On Sun, 7 Jun 2020, Gerald Pfeifer wrote:
Between Wine 5.9 and 5.10 many ntdll functions moved to the Unix library. Make the implementation of InterlockedCompareExchange64 via RtlInterlockedCompareExchange64 available there as well for targets without __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8.
This fixes the build on FreeBSD/i386 with GCC 9.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com
dlls/ntdll/unix/unix_private.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index a422fd825e..a0485b411d 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -23,6 +23,10 @@
#include "unixlib.h"
+#ifndef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +#define InterlockedCompareExchange64(dest,xchg,cmp) RtlInterlockedCompareExchange64(dest,xchg,cmp) +#endif
struct debug_info { unsigned int str_pos; /* current position in strings buffer */