commit:     b15be1cefe3f1288144bf23d5251e45a0428faa5
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 11 07:32:48 2023 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Aug 11 10:00:07 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b15be1ce

app-emulation/wine-proton: pass -latomic with clang for ntdll.so

Specific to Valve's fync patches, aka:
ntdll/unix/fsync.c:368: undefined reference to `__atomic_load_8'

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 app-emulation/wine-proton/wine-proton-8.0.3c.ebuild   | 5 +++++
 app-emulation/wine-proton/wine-proton-8.0.9999.ebuild | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/app-emulation/wine-proton/wine-proton-8.0.3c.ebuild 
b/app-emulation/wine-proton/wine-proton-8.0.3c.ebuild
index 79fa39b47160..cad46d367304 100644
--- a/app-emulation/wine-proton/wine-proton-8.0.3c.ebuild
+++ b/app-emulation/wine-proton/wine-proton-8.0.3c.ebuild
@@ -60,8 +60,10 @@ WINE_DLOPEN_DEPEND="
        v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
        xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
        xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )"
+# gcc: for -latomic with clang
 WINE_COMMON_DEPEND="
        ${WINE_DLOPEN_DEPEND}
+       sys-devel/gcc:*
        x11-libs/libX11[${MULTILIB_USEDEP}]
        x11-libs/libXext[${MULTILIB_USEDEP}]
        alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
@@ -154,6 +156,9 @@ src_prepare() {
                # and it still gets used in install phase despite --with-mingw,
                # drop as a quick fix for now which hopefully should be safe
                sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+
+               # needed by Valve's fsync patches if using clang (undef 
atomic_load_8)
+               sed -i '/^UNIX_LIBS.*=/s/$/ -latomic/' dlls/ntdll/Makefile.in 
|| die
        fi
 
        # ensure .desktop calls this variant + slot

diff --git a/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild 
b/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
index 264e3ea19172..248c24788eab 100644
--- a/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
+++ b/app-emulation/wine-proton/wine-proton-8.0.9999.ebuild
@@ -60,8 +60,10 @@ WINE_DLOPEN_DEPEND="
        v4l? ( media-libs/libv4l[${MULTILIB_USEDEP}] )
        xcomposite? ( x11-libs/libXcomposite[${MULTILIB_USEDEP}] )
        xinerama? ( x11-libs/libXinerama[${MULTILIB_USEDEP}] )"
+# gcc: for -latomic with clang
 WINE_COMMON_DEPEND="
        ${WINE_DLOPEN_DEPEND}
+       sys-devel/gcc:*
        x11-libs/libX11[${MULTILIB_USEDEP}]
        x11-libs/libXext[${MULTILIB_USEDEP}]
        alsa? ( media-libs/alsa-lib[${MULTILIB_USEDEP}] )
@@ -154,6 +156,9 @@ src_prepare() {
                # and it still gets used in install phase despite --with-mingw,
                # drop as a quick fix for now which hopefully should be safe
                sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die
+
+               # needed by Valve's fsync patches if using clang (undef 
atomic_load_8)
+               sed -i '/^UNIX_LIBS.*=/s/$/ -latomic/' dlls/ntdll/Makefile.in 
|| die
        fi
 
        # ensure .desktop calls this variant + slot

Reply via email to