diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-ifunc.patch b/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-ifunc.patch new file mode 100644 index 0000000000000..02122d6c03ae1 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-ifunc.patch @@ -0,0 +1,12 @@ +https://bugs.gentoo.org/981510 +https://github.com/qt/qtwebengine-chromium/commit/9bfd376e00327 +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/src/partition_alloc/aarch64_support.h +@@ -16,5 +16,6 @@ + #include "partition_alloc/buildflags.h" + +-#if PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX) ++#if (PA_BUILDFLAG(IS_ANDROID) || PA_BUILDFLAG(IS_LINUX)) && \ ++ __has_include() + #define HAS_HW_CAPS + #endif diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-mte.patch b/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-mte.patch new file mode 100644 index 0000000000000..d23a5aa464b12 --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.11.1-musl-arm64-mte.patch @@ -0,0 +1,20 @@ +Add a mean to disable the has_memory_tagging condition so the ebuild +can disable it where needed. Just a quick solution, ideally Gn itself +should be able to figure this out. + +https://bugs.gentoo.org/981510 +https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/chromium/partalloc-no-tagging-arm64.patch +--- a/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni ++++ b/src/3rdparty/chromium/base/allocator/partition_allocator/partition_alloc.gni +@@ -88,6 +88,10 @@ + use_large_empty_slot_span_ring = true + ++declare_args() { ++ allow_memory_tagging = true ++} ++ + has_memory_tagging = current_cpu == "arm64" && is_clang && !is_asan && +- !is_hwasan && (is_linux || is_android) ++ !is_hwasan && (is_linux || is_android) && allow_memory_tagging + + declare_args() { diff --git a/dev-qt/qtwebengine/qtwebengine-6.11.1.ebuild b/dev-qt/qtwebengine/qtwebengine-6.11.1.ebuild index 5566579b294aa..1d21e7771015f 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.11.1.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.11.1.ebuild @@ -113,6 +113,8 @@ PATCHES+=( "${FILESDIR}"/${PN}-6.11.0-gcc17.patch "${FILESDIR}"/${PN}-6.11.1-gcc17.patch "${FILESDIR}"/${PN}-6.11.1-musl-missing-includes.patch + "${FILESDIR}"/${PN}-6.11.1-musl-arm64-ifunc.patch + "${FILESDIR}"/${PN}-6.11.1-musl-arm64-mte.patch ) python_check_deps() { @@ -244,6 +246,9 @@ src_configure() { symbol_level=0 ) + use arm64 && use elibc_musl && + mygnargs+=( allow_memory_tagging=false ) #981510 + if use !custom-cflags; then # qtwebengine can be rather fragile with *FLAGS filter-lto diff --git a/dev-qt/qtwebengine/qtwebengine-6.11.2.ebuild b/dev-qt/qtwebengine/qtwebengine-6.11.2.ebuild index dcdeee9be7989..e21a44a472b4b 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.11.2.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.11.2.ebuild @@ -112,6 +112,7 @@ PATCHES+=( "${FILESDIR}"/${PN}-6.10.3-climits.patch "${FILESDIR}"/${PN}-6.11.0-gcc17.patch "${FILESDIR}"/${PN}-6.11.1-musl-missing-includes.patch + "${FILESDIR}"/${PN}-6.11.1-musl-arm64-mte.patch ) python_check_deps() { @@ -243,6 +244,9 @@ src_configure() { symbol_level=0 ) + use arm64 && use elibc_musl && + mygnargs+=( allow_memory_tagging=false ) #981510 + if use !custom-cflags; then # qtwebengine can be rather fragile with *FLAGS filter-lto diff --git a/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild index dcdeee9be7989..e21a44a472b4b 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.11.9999.ebuild @@ -112,6 +112,7 @@ PATCHES+=( "${FILESDIR}"/${PN}-6.10.3-climits.patch "${FILESDIR}"/${PN}-6.11.0-gcc17.patch "${FILESDIR}"/${PN}-6.11.1-musl-missing-includes.patch + "${FILESDIR}"/${PN}-6.11.1-musl-arm64-mte.patch ) python_check_deps() { @@ -243,6 +244,9 @@ src_configure() { symbol_level=0 ) + use arm64 && use elibc_musl && + mygnargs+=( allow_memory_tagging=false ) #981510 + if use !custom-cflags; then # qtwebengine can be rather fragile with *FLAGS filter-lto diff --git a/dev-qt/qtwebengine/qtwebengine-6.12.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.12.9999.ebuild index dcdeee9be7989..e21a44a472b4b 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.12.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.12.9999.ebuild @@ -112,6 +112,7 @@ PATCHES+=( "${FILESDIR}"/${PN}-6.10.3-climits.patch "${FILESDIR}"/${PN}-6.11.0-gcc17.patch "${FILESDIR}"/${PN}-6.11.1-musl-missing-includes.patch + "${FILESDIR}"/${PN}-6.11.1-musl-arm64-mte.patch ) python_check_deps() { @@ -243,6 +244,9 @@ src_configure() { symbol_level=0 ) + use arm64 && use elibc_musl && + mygnargs+=( allow_memory_tagging=false ) #981510 + if use !custom-cflags; then # qtwebengine can be rather fragile with *FLAGS filter-lto diff --git a/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild index 6f24e091dd555..5aeb2ac84dd9b 100644 --- a/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild +++ b/dev-qt/qtwebengine/qtwebengine-6.9999.ebuild @@ -242,6 +242,9 @@ src_configure() { symbol_level=0 ) + use arm64 && use elibc_musl && + mygnargs+=( allow_memory_tagging=false ) #981510 + if use !custom-cflags; then # qtwebengine can be rather fragile with *FLAGS filter-lto