commit: a4d07e3e0777755ad6c95ff9adf70c43f940e540 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Tue Jan 20 01:00:03 2026 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Tue Jan 20 02:09:27 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4d07e3e
dev-qt/qtwebengine: fix build with clang + bfd Would prefer not use conditional patching, so use something similar to upstream's (initial) solution rather than the PR's (thanks for the information and links though!). It was reverted upstream because it failed with the gold linker, but Gentoo does not support using gold anymore and the current patch should not make things worse for gold either way. Also include in 6.10 + 6.11.9999 for now given a fix would miss the 6.10.2 release (and we copy 6.10.9999 -> 6.10.2) and may still be needed for some time or more releases given this had no activity in over a month upstream. Will not add to patchsets so that we can remove it easily once fixed. Closes: https://github.com/gentoo/gentoo/pull/45441 Thanks-to: Z. Liu <zhixu.liu <AT> gmail.com> Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> .../files/qtwebengine-6.10.1-clang-bfd.patch | 26 ++++++++++++++++++++++ .../files/qtwebengine-6.11.0-clang-bfd.patch | 26 ++++++++++++++++++++++ dev-qt/qtwebengine/qtwebengine-6.10.1.ebuild | 1 + dev-qt/qtwebengine/qtwebengine-6.10.9999.ebuild | 1 + dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild | 1 + 5 files changed, 55 insertions(+) diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.10.1-clang-bfd.patch b/dev-qt/qtwebengine/files/qtwebengine-6.10.1-clang-bfd.patch new file mode 100644 index 000000000000..0b2d6e09da01 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.10.1-clang-bfd.patch @@ -0,0 +1,26 @@ +Based on [1] which got reverted[2] because it failed for gold, however +we do not support the gold linker either way anymore and can use this +method until upstream finds their own solution. + +Note that !use_bfd is not a thing, so we need to check other linkers. +Reported to work fine for mold, while it is unknown for the new'ish +wild. At worst using the bfd path will just be slightly slower assuming +the linker is even remotely compatible. + +As a precaution, keeping the previous !is_clang albeit it should not +matter. + +https://qt-project.atlassian.net/browse/QTBUG-141153 +https://github.com/gentoo/gentoo/pull/45441 + +[1] https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/684653 +[2] https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/690328 +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -2532,5 +2532,5 @@ + # .o files, instead of just references to .o files in the build directoy + config("thin_archive") { +- if ((is_apple && use_lld) || (is_linux && !is_clang)) { ++ if ((is_apple && use_lld) || (is_linux && (!is_clang || (!use_lld && !use_mold)))) { + # The macOS and iOS linker ld64.ldd doesn't support thin archive without + # symbol table, gcc on linux also throws the error `archive has no index`. diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.11.0-clang-bfd.patch b/dev-qt/qtwebengine/files/qtwebengine-6.11.0-clang-bfd.patch new file mode 100644 index 000000000000..6cf46e0d32b2 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.11.0-clang-bfd.patch @@ -0,0 +1,26 @@ +Based on [1] which got reverted[2] because it failed for gold, however +we do not support the gold linker either way anymore and can use this +method until upstream finds their own solution. + +Note that !use_bfd is not a thing, so we need to check other linkers. +Reported to work fine for mold, while it is unknown for the new'ish +wild. At worst using the bfd path will just be slightly slower assuming +the linker is even remotely compatible. + +As a precaution, keeping the previous !is_clang albeit it should not +matter. + +https://qt-project.atlassian.net/browse/QTBUG-141153 +https://github.com/gentoo/gentoo/pull/45441 + +[1] https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/684653 +[2] https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/690328 +--- a/src/3rdparty/chromium/build/config/compiler/BUILD.gn ++++ b/src/3rdparty/chromium/build/config/compiler/BUILD.gn +@@ -2760,5 +2760,5 @@ + # .o files, instead of just references to .o files in the build directoy + config("thin_archive") { +- if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") { ++ if ((is_apple && use_lld) || (is_linux && (!is_clang || (!use_lld && !use_mold))) || current_os == "aix") { + # The macOS and iOS linker ld64.ldd doesn't support thin archive without + # symbol table, gcc on linux also throws the error `archive has no index`. diff --git a/dev-qt/qtwebengine/qtwebengine-6.10.1.ebuild b/dev-qt/qtwebengine/qtwebengine-6.10.1.ebuild index 226199ffdf68..06d5c973fa16 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.10.1.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.10.1.ebuild @@ -108,6 +108,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions + "${FILESDIR}"/${PN}-6.10.1-clang-bfd.patch ) python_check_deps() { diff --git a/dev-qt/qtwebengine/qtwebengine-6.10.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.10.9999.ebuild index 6704dc06cc28..460d2f548f86 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.10.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.10.9999.ebuild @@ -108,6 +108,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions + "${FILESDIR}"/${PN}-6.10.1-clang-bfd.patch ) python_check_deps() { diff --git a/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild index 189b8b50f222..25038ae11045 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild @@ -108,6 +108,7 @@ PATCHES=( "${WORKDIR}"/patches/${PN} ) PATCHES+=( # add extras as needed here, may merge in set if carries across versions + "${FILESDIR}"/${PN}-6.11.0-clang-bfd.patch ) python_check_deps() {
