$ git diff --patch-with-stat --summary c747f423870b656479c8c3d24d927747991c1d2b..1952cac2ee97d5151dc52715e37be10258f7ad0a
wine-5.6-schrpc-gcc-workaround.patch | 12 ++++++++++++
wine.spec | 27 ++++++++++++++++++---------
2 files changed, 30 insertions(+), 9 deletions(-)
create mode 100644 wine-5.6-schrpc-gcc-workaround.patch
diff --git a/wine-5.6-schrpc-gcc-workaround.patch b/wine-5.6-schrpc-gcc-workaround.patch
new file mode 100644
index 0000000..78ff3cd
--- /dev/null
+++ b/wine-5.6-schrpc-gcc-workaround.patch
@@ -0,0 +1,12 @@
+diff -up wine-5.6/dlls/schedsvc/tests/schrpc_c.c.omv~ wine-5.6/dlls/schedsvc/tests/schrpc_c.c
+--- wine-5.6/dlls/schedsvc/tests/schrpc_c.c.omv~ 2020-04-18 23:41:19.357785500 +0200
++++ wine-5.6/dlls/schedsvc/tests/schrpc_c.c 2020-04-18 23:41:29.526894692 +0200
+@@ -148,7 +148,7 @@ static const MIDL_PROC_FORMAT_STRING __M
+ * ITaskSchedulerService interface
+ */
+
+-handle_t rpc_handle;
++extern handle_t rpc_handle;
+
+ static const RPC_CLIENT_INTERFACE ITaskSchedulerService___RpcClientInterface =
+ {
diff --git a/wine.spec b/wine.spec
index 08ead9c..be33c35 100644
--- a/wine.spec
+++ b/wine.spec
@@ -8,8 +8,8 @@
# Build time errors with lld 9.0.0-rc1 on x86_32 only
# ld: error: can't create dynamic relocation R_386_32 against symbol: .L.str in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
%ifarch %{ix86}
-%global optflags %{optflags} -Wl,-z,notext
-%global ldflags %{ldflags} -Wl,-z,notext
+%global optflags %{optflags} -Wl,-z,notext -fuse-ld=lld
+%global ldflags %{ldflags} -Wl,-z,notext -fuse-ld=lld
%endif
%ifarch %{x86_64}
@@ -44,7 +44,7 @@ Release: 0.%{beta}.1
Source0: https://dl.winehq.org/wine/source/%(echo %version |cut -d. -f1-2)/%{name}-%{version}-%{beta}.tar.xz
Source1: https://dl.winehq.org/wine/source/%(echo %version |cut -d. -f1-2)/%{name}-%{version}-%{beta}.tar.xz.sign
%else
-Release: 1
+Release: 2
Source0: http://dl.winehq.org/wine/source/%(echo %version |cut -d. -f1).x/wine-%{version}.tar.xz
Source1: http://dl.winehq.org/wine/source/%(echo %version |cut -d. -f1).x/wine-%{version}.tar.xz.sign
%endif
@@ -70,6 +70,7 @@ Patch2: wine-cjk.patch
# https://bugs.winehq.org/show_bug.cgi?id=41930#c0
Patch4: 0001-Revert-gdi32-Fix-arguments-for-OSMesaMakeCurrent-whe.patch
Patch5: wine-4.14-fix-crackling-audio.patch
+Patch6: wine-5.6-schrpc-gcc-workaround.patch
# a: => /media/floppy
# d: => $HOME (at config_dir creation time, not refreshed if $HOME changes;
@@ -347,9 +348,13 @@ autoreconf
export CFLAGS="%{optflags} -fno-omit-frame-pointer"
%endif
-# Clang doesn't support M$ ABI on 64bit
-#export CC=gcc
-#export CXX=g++
+%ifarch %{x86_64}
+# As of wine 5.6, clang 10.0:
+# winecfg in 64bit mode crashes on startup if built with
+# clang. Probably clang doesn't get the M$ ABI right
+export CC=gcc
+export CXX=g++
+%endif
%configure --with-pulse \
--without-hal \
@@ -360,11 +365,15 @@ export CFLAGS="%{optflags} -fno-omit-frame-pointer"
--enable-win64
%endif
-%make depend
-%make
+%make_build depend
+if ! %make_build; then
+ # Ugly, but effective -- let's patch some generated code...
+ patch -p1 -b -z .gcc10~ <%{PATCH6}
+ %make_build
+fi
%install
-%makeinstall_std LDCONFIG=/bin/true
+%make_install LDCONFIG=/bin/true
install -m 0755 %{SOURCE11} %{buildroot}%{_bindir}/
install -m 0755 %{SOURCE12} %{buildroot}%{_bindir}/