commit: 877936c3513d7ef069423a35a856a5ff7ba5c133 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Fri Aug 11 09:48:23 2023 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Fri Aug 11 10:33:54 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=877936c3
app-emulation/wine-staging: tentatively allow lld again in latest Seems fine, no large binaries nor (obvious) issues at runtime. Please report if there's major issues that would require forcing bfd again. Mold still seems broken, no large binaries but been simply getting a Segmentation Fault when run winecfg. So do nothing if recognize bfd or lld, but force whichever is available otherwise. Leaving alone for older versions as a precaution. On a side-note, I hope nobody is passing -fuse-ld=lld in CFLAGS rather than LDFLAGS where it belongs as this would break compile+link at once mingw64-toolchain PE tests. Bug: https://bugs.gentoo.org/867097 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> .../wine-staging/wine-staging-8.13.ebuild | 23 ++++++++++++---------- .../wine-staging/wine-staging-9999.ebuild | 23 ++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/app-emulation/wine-staging/wine-staging-8.13.ebuild b/app-emulation/wine-staging/wine-staging-8.13.ebuild index da465be0fe33..7b7a4e1c36dc 100644 --- a/app-emulation/wine-staging/wine-staging-8.13.ebuild +++ b/app-emulation/wine-staging/wine-staging-8.13.ebuild @@ -137,8 +137,11 @@ BDEPEND=" sys-apps/util-linux ) ) + || ( + sys-devel/binutils + sys-devel/lld + ) dev-lang/perl - sys-devel/binutils sys-devel/bison sys-devel/flex virtual/pkgconfig @@ -296,18 +299,18 @@ src_configure() { $(use_with xinerama) ) - # builds with non-bfd but broken at runtime (bug #867097) - # TODO: retest mold and lld, and figure out what's wrong if - # still broken given (at least) lld is supposed to work - tc-ld-force-bfd - filter-lto # build failure use custom-cflags || strip-flags # can break in obscure ways at runtime - # temporary workaround for tc-ld-force-bfd not yet enforcing with mold - # https://github.com/gentoo/gentoo/pull/28355 - [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && - append-ldflags -fuse-ld=bfd + # wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097) + # (do self test until https://github.com/gentoo/gentoo/pull/28355) + if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]] + then + has_version -b sys-devel/binutils && + append-ldflags -fuse-ld=bfd || + append-ldflags -fuse-ld=lld + strip-unsupported-flags + fi if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH} diff --git a/app-emulation/wine-staging/wine-staging-9999.ebuild b/app-emulation/wine-staging/wine-staging-9999.ebuild index da465be0fe33..7b7a4e1c36dc 100644 --- a/app-emulation/wine-staging/wine-staging-9999.ebuild +++ b/app-emulation/wine-staging/wine-staging-9999.ebuild @@ -137,8 +137,11 @@ BDEPEND=" sys-apps/util-linux ) ) + || ( + sys-devel/binutils + sys-devel/lld + ) dev-lang/perl - sys-devel/binutils sys-devel/bison sys-devel/flex virtual/pkgconfig @@ -296,18 +299,18 @@ src_configure() { $(use_with xinerama) ) - # builds with non-bfd but broken at runtime (bug #867097) - # TODO: retest mold and lld, and figure out what's wrong if - # still broken given (at least) lld is supposed to work - tc-ld-force-bfd - filter-lto # build failure use custom-cflags || strip-flags # can break in obscure ways at runtime - # temporary workaround for tc-ld-force-bfd not yet enforcing with mold - # https://github.com/gentoo/gentoo/pull/28355 - [[ $($(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) == mold* ]] && - append-ldflags -fuse-ld=bfd + # wine uses linker tricks unlikely to work with non-bfd/lld (bug #867097) + # (do self test until https://github.com/gentoo/gentoo/pull/28355) + if [[ $(LC_ALL=C $(tc-getCC) ${LDFLAGS} -Wl,--version 2>/dev/null) != @(LLD|GNU\ ld)* ]] + then + has_version -b sys-devel/binutils && + append-ldflags -fuse-ld=bfd || + append-ldflags -fuse-ld=lld + strip-unsupported-flags + fi if use mingw; then use crossdev-mingw || PATH=${BROOT}/usr/lib/mingw64-toolchain/bin:${PATH}
