From 4dd3637b6e33a2d1a06f3fde2229fbfbc6ad4dd2 Mon Sep 17 00:00:00 2001 From: Ionen Wolkens Date: Sun, 7 Jun 2026 19:08:50 -0400 Subject: [PATCH] app-emulation/wine-proton: force gcc+bfd for wine-proton-11 May be there permanently unless Valve gains an interest in doing support outside their own usecase. Would rather not accumulate downstream fixes and workarounds. For users that do not want to pull gcc, I'd recommend to stick to regular wine-vanilla/staging which does care about clang support. Closes: https://bugs.gentoo.org/977021 Signed-off-by: Ionen Wolkens --- .../wine-proton-11.0.1_beta5.ebuild | 23 ++++++++----------- .../wine-proton/wine-proton-9999.ebuild | 23 ++++++++----------- 2 files changed, 18 insertions(+), 28 deletions(-) diff --git a/app-emulation/wine-proton/wine-proton-11.0.1_beta5.ebuild b/app-emulation/wine-proton/wine-proton-11.0.1_beta5.ebuild index 90945dbd10c44..e979355d089f7 100644 --- a/app-emulation/wine-proton/wine-proton-11.0.1_beta5.ebuild +++ b/app-emulation/wine-proton/wine-proton-11.0.1_beta5.ebuild @@ -117,18 +117,16 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} - || ( - sys-devel/gcc:* - llvm-runtimes/compiler-rt:*[atomic-builtins(-)] - ) >=sys-kernel/linux-headers-6.14 X? ( x11-base/xorg-proto ) " BDEPEND=" ${PYTHON_DEPS} dev-lang/perl + sys-devel/binutils:* sys-devel/bison sys-devel/flex + sys-devel/gcc:* virtual/pkgconfig nls? ( sys-devel/gettext ) wayland? ( dev-util/wayland-scanner ) @@ -156,22 +154,19 @@ src_prepare() { wine_src_prepare - # this is kind-of best effort and ignores llvm slots, ideally - # atomic-builtins should be package.use.force then could drop this - if tc-is-clang && [[ $(tc-get-c-rtlib) == compiler-rt ]] && - has_version -d 'llvm-runtimes/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 - # proton variant also needs specfiles and vulkan tools/make_specfiles || die # perl dlls/winevulkan/make_vulkan -X video.xml -x vk.xml || die # python } src_configure() { + # Valve does not really support anything but gcc+bfd, and some of + # their modifications to Wine have been fragile and accumulating + # issues that they have no interest in fixing (bug #977021) + tc-is-gcc || unset AR AS CC CPP CXX LD NM OBJ{COPY,DUMP} RANLIB READELF STRIP + tc-ld-is-bfd || append-ldflags -fuse-ld=bfd + strip-unsupported-flags + local wineconfargs=( # upstream (Valve) doesn't really support misc configurations (e.g. # adds vulkan code not always guarded by --with-vulkan), so force diff --git a/app-emulation/wine-proton/wine-proton-9999.ebuild b/app-emulation/wine-proton/wine-proton-9999.ebuild index a0fddd469e892..dcfd5491143a7 100644 --- a/app-emulation/wine-proton/wine-proton-9999.ebuild +++ b/app-emulation/wine-proton/wine-proton-9999.ebuild @@ -117,18 +117,16 @@ RDEPEND=" " DEPEND=" ${WINE_COMMON_DEPEND} - || ( - sys-devel/gcc:* - llvm-runtimes/compiler-rt:*[atomic-builtins(-)] - ) >=sys-kernel/linux-headers-6.14 X? ( x11-base/xorg-proto ) " BDEPEND=" ${PYTHON_DEPS} dev-lang/perl + sys-devel/binutils:* sys-devel/bison sys-devel/flex + sys-devel/gcc:* virtual/pkgconfig nls? ( sys-devel/gettext ) wayland? ( dev-util/wayland-scanner ) @@ -156,22 +154,19 @@ src_prepare() { wine_src_prepare - # this is kind-of best effort and ignores llvm slots, ideally - # atomic-builtins should be package.use.force then could drop this - if tc-is-clang && [[ $(tc-get-c-rtlib) == compiler-rt ]] && - has_version -d 'llvm-runtimes/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 - # proton variant also needs specfiles and vulkan tools/make_specfiles || die # perl dlls/winevulkan/make_vulkan -X video.xml -x vk.xml || die # python } src_configure() { + # Valve does not really support anything but gcc+bfd, and some of + # their modifications have been fragile and accumulating issues + # that they seemingly have no interest in fixing (bug #977021) + tc-is-gcc || unset AR AS CC CPP CXX LD NM OBJ{COPY,DUMP} RANLIB READELF STRIP + tc-ld-is-bfd || append-ldflags -fuse-ld=bfd + strip-unsupported-flags + local wineconfargs=( # upstream (Valve) doesn't really support misc configurations (e.g. # adds vulkan code not always guarded by --with-vulkan), so force