commit: 3d53cd8f1e240085d7e6831caf5be0c076d28cd5 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Fri Aug 11 09:36:21 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=3d53cd8f
app-emulation/wine-vanilla: 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-vanilla/wine-vanilla-8.13.ebuild | 23 ++++++++++++---------- .../wine-vanilla/wine-vanilla-9999.ebuild | 23 ++++++++++++---------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild index dbe3af0eae78..1f7ab3b864a8 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild @@ -124,8 +124,11 @@ DEPEND=" sys-kernel/linux-headers X? ( x11-base/xorg-proto )" BDEPEND=" + || ( + sys-devel/binutils + sys-devel/lld + ) dev-lang/perl - sys-devel/binutils sys-devel/bison sys-devel/flex virtual/pkgconfig @@ -256,18 +259,18 @@ src_configure() { $(usev !odbc ac_cv_lib_soname_odbc=) ) - # 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-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild index dbe3af0eae78..1f7ab3b864a8 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild @@ -124,8 +124,11 @@ DEPEND=" sys-kernel/linux-headers X? ( x11-base/xorg-proto )" BDEPEND=" + || ( + sys-devel/binutils + sys-devel/lld + ) dev-lang/perl - sys-devel/binutils sys-devel/bison sys-devel/flex virtual/pkgconfig @@ -256,18 +259,18 @@ src_configure() { $(usev !odbc ac_cv_lib_soname_odbc=) ) - # 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}