diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2023-08-14 09:50:12 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2023-08-14 12:39:24 -0400 |
commit | 3fcaa1a69c6b133af087eee7d40a77484d035f31 (patch) | |
tree | f320ee295ae841f3fbb6b8d684ba0166bebc5815 /app-emulation | |
parent | profiles/features/llvm: update description for wine mingw forcing (diff) | |
download | gentoo-3fcaa1a69c6b133af087eee7d40a77484d035f31.tar.gz gentoo-3fcaa1a69c6b133af087eee7d40a77484d035f31.tar.bz2 gentoo-3fcaa1a69c6b133af087eee7d40a77484d035f31.zip |
app-emulation/wine-vanilla: "allow" USE=-mingw with clang for latest
Quotes given that is only if EXTRA_ECONF is used.
Explored the idea to support it (after bug #912237 is fixed),
and while it works for a basic setup, getting the ebuild *right*
for all configurations quickly got messy and not sure want the
increased maintenance.
To outline some thoughts:
1. USE=-mingw with clang is different than with gcc, gcc won't build
PE files (old layout) while clang needs it (--enable-archs). Meaning
would need a flag to mirror USE=mingw like USE=pe-clang to apply
similar logic with flags, stripping, and other verifications.
-> automagic depending on tc-is-clang is *possible*, but then can't
have e.g. wow64? ( || ( pe-clang mingw ) ) and need to have more
heuristics-based logic
2. test-flags-* cannot be used with `-target *-windows` given there
won't be any runtime (wine does early tests differently), albeit
*could* fallback to a safe CROSSFLAGS="-g -O2" or so
3. not sure want to deal with every future issues with clang cross
no top of mingw's and, on that note, clang-17 is currently broken
with USE=-mingw given don't believe can safely strip -mabi=ms as a
workaround if cross actually gets used
4. there are a lot of combinations to potentially handle, aka
gcc+mingw, gcc w/o mingw, clang w/o mingw, clang+mingw, gcc+pe-clang,
and some of these with either bfd or lld, and with or without 32bit...
And this is turning rather messy and Wine is already kind of fragile
and tracking runtime issues is difficult
5. ...ideally would want to reduce this by forcing mingw even with gcc
(like wine-proton) to simplify, not add more -- albeit if add clang PE
support then it should likely be combined with dropping non-PE support
to balance (i.e. could require clang with USE=-mingw)
6. wine with clang is less tested by distros, users, and well, me
(hardly even try USE=-mingw builds+runtime anymore as-is, including
with gcc), and feel it's better not pretend to support it
Not excluding revisiting, albeit would rather not deal with this at
the moment.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'app-emulation')
7 files changed, 36 insertions, 28 deletions
diff --git a/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild index 3ce352533b56..d8a883dc6e14 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-7.0.2.ebuild @@ -174,12 +174,12 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # ./configure will fail, abort early + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild index 364fb01af774..ed19030553fe 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.0.1.ebuild @@ -172,12 +172,12 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # ./configure will fail, abort early + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild index b95ead30f8be..47bb63ce2f1b 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.0.2.ebuild @@ -172,12 +172,12 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # ./configure will fail, abort early + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild index 5221f7e79d76..51ab700e53b0 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.11-r1.ebuild @@ -176,12 +176,12 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # ./configure will fail, abort early + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild index 5221f7e79d76..51ab700e53b0 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.12.ebuild @@ -176,12 +176,12 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # ./configure will fail, abort early + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild index c23622bc7e06..1aaebe5aa269 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-8.13.ebuild @@ -189,12 +189,16 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # fails in ./configure unless --enable-archs is passed, allow to + # bypass with EXTRA_ECONF but is currently considered unsupported + # (by Gentoo) as additional work is needed for (proper) support + # note: also fails w/ :17, but unsure if safe to drop w/o mingw + [[ ${EXTRA_ECONF} == *--enable-archs* ]] || + die "building ${PN} with clang is only supported with USE=mingw" fi fi diff --git a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild index c23622bc7e06..1aaebe5aa269 100644 --- a/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild +++ b/app-emulation/wine-vanilla/wine-vanilla-9999.ebuild @@ -189,12 +189,16 @@ src_prepare() { if tc-is-clang; then if use mingw; then # -mabi=ms was ignored by <clang:16 then turned error in :17 - # and it still gets used in install phase despite USE=mingw, - # drop as a quick fix for now which hopefully should be safe + # if used without --target *-windows, then gets used in install + # phase despite USE=mingw, drop as a quick fix for now sed -i '/MSVCRTFLAGS=/s/-mabi=ms//' configure.ac || die else - # known broken due to bug #912237, require mingw for now - die "building ${PN} with clang requires USE=mingw to be enabled" + # fails in ./configure unless --enable-archs is passed, allow to + # bypass with EXTRA_ECONF but is currently considered unsupported + # (by Gentoo) as additional work is needed for (proper) support + # note: also fails w/ :17, but unsure if safe to drop w/o mingw + [[ ${EXTRA_ECONF} == *--enable-archs* ]] || + die "building ${PN} with clang is only supported with USE=mingw" fi fi |