diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2024-11-27 22:48:48 -0500 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2024-11-28 00:36:27 -0500 |
commit | a15fa5bb5c73df85a7261af00158780ca309f357 (patch) | |
tree | d865871652c5f34fd6b365c559ae530761e22bfa /app-emulation | |
parent | net-nds/openldap: Stabilize 2.6.6-r2 x86, #913161 (diff) | |
download | gentoo-a15fa5bb5c73df85a7261af00158780ca309f357.tar.gz gentoo-a15fa5bb5c73df85a7261af00158780ca309f357.tar.bz2 gentoo-a15fa5bb5c73df85a7261af00158780ca309f357.zip |
app-emulation/wine-proton: allow using compiler-rt[atomic-builtins]
Passing -latomic is no longer needed when using the new compiler-rt
w/ USE=atomic-builtins, and lets gcc be optional on llvm profiles.
To recap:
* gcc: don't need -latomic
* clang (w/o compiler-rt): don't need -latomic
* clang + compiler-rt[atomic-builtins]: don't need -latomic
* clang + compiler-rt[-atomic-builtins]: needs -latomic
So, if compiler-rt always provides atomics in the future (rather
than optional) all workarounds could be dropped.
The || ( ) is a bit "best effort" given dependencies don't know
what is actually going to be used.
(not worth a revbump, if really want to depclean gcc please
re-emerge manually)
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-emulation')
-rw-r--r-- | app-emulation/wine-proton/wine-proton-8.0.5c.ebuild | 19 | ||||
-rw-r--r-- | app-emulation/wine-proton/wine-proton-9.0.2.ebuild | 19 | ||||
-rw-r--r-- | app-emulation/wine-proton/wine-proton-9.0.3.ebuild | 19 | ||||
-rw-r--r-- | app-emulation/wine-proton/wine-proton-9999.ebuild | 19 |
4 files changed, 56 insertions, 20 deletions
diff --git a/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild b/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild index fe281d763060..484175067031 100644 --- a/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild +++ b/app-emulation/wine-proton/wine-proton-8.0.5c.ebuild @@ -62,10 +62,8 @@ WINE_DLOPEN_DEPEND=" 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}] x11-libs/libdrm[video_cards_amdgpu?,${MULTILIB_USEDEP}] @@ -98,6 +96,10 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} + || ( + sys-devel/gcc:* + sys-libs/compiler-rt:*[atomic-builtins(-)] + ) sys-kernel/linux-headers x11-base/xorg-proto " @@ -165,9 +167,16 @@ src_prepare() { # 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 -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ - -i dlls/{ntdll,winevulkan}/Makefile.in || die + # note: this is kind-of best effort and ignores llvm slots, rather + # than do LLVM_SLOT it may(?) be better to force atomic-builtins + # then could drop this altogether in the future + if [[ $(tc-get-c-rtlib) == compiler-rt ]] && + has_version 'sys-libs/compiler-rt[-atomic-builtins(-)]' + then + # needed by Valve's fsync patches if using compiler-rt w/o atomics + sed -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ + -i dlls/{ntdll,winevulkan}/Makefile.in || die + fi fi # ensure .desktop calls this variant + slot diff --git a/app-emulation/wine-proton/wine-proton-9.0.2.ebuild b/app-emulation/wine-proton/wine-proton-9.0.2.ebuild index 4a959910a693..e025b12e1398 100644 --- a/app-emulation/wine-proton/wine-proton-9.0.2.ebuild +++ b/app-emulation/wine-proton/wine-proton-9.0.2.ebuild @@ -63,10 +63,8 @@ WINE_DLOPEN_DEPEND=" 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}] x11-libs/libdrm[video_cards_amdgpu?,${MULTILIB_USEDEP}] @@ -102,6 +100,10 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} + || ( + sys-devel/gcc:* + sys-libs/compiler-rt:*[atomic-builtins(-)] + ) sys-kernel/linux-headers x11-base/xorg-proto " @@ -177,9 +179,16 @@ src_prepare() { # 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 -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ - -i dlls/{ntdll,winevulkan}/Makefile.in || die + # note: this is kind-of best effort and ignores llvm slots, rather + # than do LLVM_SLOT it may(?) be better to force atomic-builtins + # then could drop this altogether in the future + if [[ $(tc-get-c-rtlib) == compiler-rt ]] && + has_version 'sys-libs/compiler-rt[-atomic-builtins(-)]' + then + # needed by Valve's fsync patches if using compiler-rt w/o atomics + sed -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ + -i dlls/{ntdll,winevulkan}/Makefile.in || die + fi fi # ensure .desktop calls this variant + slot diff --git a/app-emulation/wine-proton/wine-proton-9.0.3.ebuild b/app-emulation/wine-proton/wine-proton-9.0.3.ebuild index 1b6c3be815f9..2b91f26fbdd4 100644 --- a/app-emulation/wine-proton/wine-proton-9.0.3.ebuild +++ b/app-emulation/wine-proton/wine-proton-9.0.3.ebuild @@ -63,10 +63,8 @@ WINE_DLOPEN_DEPEND=" 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}] x11-libs/libdrm[video_cards_amdgpu?,${MULTILIB_USEDEP}] @@ -102,6 +100,10 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} + || ( + sys-devel/gcc:* + sys-libs/compiler-rt:*[atomic-builtins(-)] + ) sys-kernel/linux-headers x11-base/xorg-proto " @@ -177,9 +179,16 @@ src_prepare() { # 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 -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ - -i dlls/{ntdll,winevulkan}/Makefile.in || die + # note: this is kind-of best effort and ignores llvm slots, rather + # than do LLVM_SLOT it may(?) be better to force atomic-builtins + # then could drop this altogether in the future + if [[ $(tc-get-c-rtlib) == compiler-rt ]] && + has_version 'sys-libs/compiler-rt[-atomic-builtins(-)]' + then + # needed by Valve's fsync patches if using compiler-rt w/o atomics + sed -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ + -i dlls/{ntdll,winevulkan}/Makefile.in || die + fi fi # ensure .desktop calls this variant + slot diff --git a/app-emulation/wine-proton/wine-proton-9999.ebuild b/app-emulation/wine-proton/wine-proton-9999.ebuild index 66402fb77063..84d47f7e7cab 100644 --- a/app-emulation/wine-proton/wine-proton-9999.ebuild +++ b/app-emulation/wine-proton/wine-proton-9999.ebuild @@ -63,10 +63,8 @@ WINE_DLOPEN_DEPEND=" 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}] x11-libs/libdrm[video_cards_amdgpu?,${MULTILIB_USEDEP}] @@ -102,6 +100,10 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} + || ( + sys-devel/gcc:* + sys-libs/compiler-rt:*[atomic-builtins(-)] + ) sys-kernel/linux-headers x11-base/xorg-proto " @@ -177,9 +179,16 @@ src_prepare() { # 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 -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ - -i dlls/{ntdll,winevulkan}/Makefile.in || die + # note: this is kind-of best effort and ignores llvm slots, rather + # than do LLVM_SLOT it may(?) be better to force atomic-builtins + # then could drop this altogether in the future + if [[ $(tc-get-c-rtlib) == compiler-rt ]] && + has_version 'sys-libs/compiler-rt[-atomic-builtins(-)]' + then + # needed by Valve's fsync patches if using compiler-rt w/o atomics + sed -e '/^UNIX_LIBS.*=/s/$/ -latomic/' \ + -i dlls/{ntdll,winevulkan}/Makefile.in || die + fi fi # ensure .desktop calls this variant + slot |