mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-08-31 09:08:08 -07:00
dev-qt/qtwebengine: fix build on arm64+clang+musl
Slightly different fix than proposed in bug #981510, but pretty sure it should work (untested). Please report if there's any issues. If anyone knows a Gn-only way for chromium to know when it cannot use this, would be interested -- bonus if upstreamed to chromium itself. Will add the mte patch in the patchset next time need to update it, it'll likely be here for a long time. Intentionally excluded from 6.9999 given we skip all chromium-specific patches there, passing a unused option only results in a warning (albeit it likely won't build anyway unless chromium fixed this). The ifunc one is upstreamed, only needed in 6.11.1. Closes: https://bugs.gentoo.org/981510 Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -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(<sys/ifunc.h>)
|
||||
#define HAS_HW_CAPS
|
||||
#endif
|
||||
@@ -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() {
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user