diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-08-11 05:48:23 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-08-11 06:33:54 -0400 |
commit | 877936c3513d7ef069423a35a856a5ff7ba5c133 (patch) | |
tree | e24aaaa93bd87caf9e4f4d085d1240dff50bda9d /app-emulation/wine-staging | |
parent | app-emulation/wine-vanilla: tentatively allow lld again in latest (diff) | |
download | gentoo-877936c3513d7ef069423a35a856a5ff7ba5c133.tar.gz gentoo-877936c3513d7ef069423a35a856a5ff7ba5c133.tar.bz2 gentoo-877936c3513d7ef069423a35a856a5ff7ba5c133.zip |
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@gentoo.org>
Diffstat (limited to 'app-emulation/wine-staging')
-rw-r--r-- | app-emulation/wine-staging/wine-staging-8.13.ebuild | 23 | ||||
-rw-r--r-- | app-emulation/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} |