Skip to content

Commit

Permalink
www/qt6-webengine: Fix build on armv7 (hopefully)
Browse files Browse the repository at this point in the history
I accidentally removed parts of certain patches meant to fix build
on armv7 in [1] which were introduced in [2]. QtWebEngine was building
at the tail end of 6.5.3 on armv7, but I seem to have regressed it with
the update to 6.6.0.

[1] https://cgit.freebsd.org/ports/commit/?id=1d76bdf62dffad91834699701f41d3374dfb6a3a
[2] https://cgit.freebsd.org/ports/commit/?id=dd2c7b778901a7b310d37f044c0018de1603c37f

MFH:		2024Q1
  • Loading branch information
BSDKaffee committed Jan 15, 2024
1 parent a080981 commit 6fbf339
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
@@ -1,4 +1,4 @@
--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2022-04-21 18:48:31 UTC
--- src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp.orig 2023-11-20 16:08:07 UTC
+++ src/3rdparty/chromium/third_party/skia/src/core/SkCpu.cpp
@@ -73,6 +73,42 @@
return features;
Expand Down Expand Up @@ -43,3 +43,27 @@
#elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>)
#include <sys/auxv.h>

@@ -110,6 +146,23 @@
if (std::size(buf) != midr_el1.read(buf, std::size(buf))
|| 0 == memcmp(kMongoose3, buf, std::size(buf))) {
features &= ~(SkCpu::ASIMDHP);
+ }
+ }
+ return features;
+ }
+
+#elif defined(SK_CPU_ARM32) && defined(__FreeBSD__)
+ #include <sys/auxv.h>
+
+ static uint32_t read_cpu_features() {
+ unsigned long hwcaps = 0;
+ uint32_t features = 0;
+
+ elf_aux_info(AT_HWCAP, (void *)&hwcaps, sizeof hwcaps);
+ if (hwcaps & HWCAP_NEON) {
+ features |= SkCpu::NEON;
+ if (hwcaps & HWCAP_VFPv4) {
+ features |= SkCpu::NEON_FMA|SkCpu::VFP_FP16;
}
}
return features;
@@ -1,4 +1,4 @@
--- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig 2022-02-07 13:39:41 UTC
--- src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc.orig 2023-11-20 16:08:07 UTC
+++ src/3rdparty/chromium/v8/src/base/platform/platform-freebsd.cc
@@ -43,14 +43,10 @@ TimezoneCache* OS::CreateTimezoneCache() {
return new PosixDefaultTimezoneCache();
Expand All @@ -20,7 +20,7 @@
lib_name = std::string(path);
}
result.push_back(SharedLibraryAddress(
+#if defined(__i386__) || defined(OS_FREEBSD)
+#if defined(__i386__) || defined(__arm__) || defined(OS_FREEBSD)
+ lib_name, static_cast<uintptr_t>(map->kve_start),
+ static_cast<uintptr_t>(map->kve_end)));
+#else
Expand Down

0 comments on commit 6fbf339

Please sign in to comment.