git: c81fbf85e8dd - main - www/{*chromium,iridium}: unbreak build on arm64 by reinstating lost patches
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 19 Feb 2026 10:25:08 UTC
The branch main has been updated by rnagy:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c81fbf85e8dd60cfffbb4d80bb22b860a196080a
commit c81fbf85e8dd60cfffbb4d80bb22b860a196080a
Author: Robert Nagy <rnagy@FreeBSD.org>
AuthorDate: 2026-02-19 10:24:08 +0000
Commit: Robert Nagy <rnagy@FreeBSD.org>
CommitDate: 2026-02-19 10:24:08 +0000
www/{*chromium,iridium}: unbreak build on arm64 by reinstating lost patches
---
...m_source_libaom_aom__ports_aarch64__cpudetect.c | 49 ++++++++++++++++++++++
...m_source_libaom_aom__ports_aarch64__cpudetect.c | 49 ++++++++++++++++++++++
...m_source_libaom_aom__ports_aarch64__cpudetect.c | 49 ++++++++++++++++++++++
3 files changed, 147 insertions(+)
diff --git a/www/chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/www/chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
new file mode 100644
index 000000000000..2ae4f09adbee
--- /dev/null
+++ b/www/chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,49 @@
+--- third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig 2026-02-19 10:23:43 UTC
++++ third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c
+@@ -127,9 +127,45 @@ static int arm_get_cpu_caps(void) {
+ return flags;
+ }
+
+-#elif defined(__linux__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++#elif defined(__OpenBSD__)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
+
++static int arm_get_cpu_caps(void) {
++ int flags = 0;
++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++ uint64_t cpu_id = 0;
++ size_t len = sizeof(cpu_id);
++
++ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A.
++
++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++ return flags;
++
++ if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++ flags |= HAS_ARM_CRC32;
++
++ return flags;
++}
++
++#elif defined(__linux__) || defined(__FreeBSD__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++
+ #include <sys/auxv.h>
++
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++ /* Only AT_HWCAP* return unsigned long */
++ if (type != AT_HWCAP && type != AT_HWCAP2) {
++ return 0;
++ }
++
++ unsigned long ret = 0;
++ elf_aux_info(type, &ret, sizeof(ret));
++ return ret;
++}
++#endif
+
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
diff --git a/www/iridium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/www/iridium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
new file mode 100644
index 000000000000..2ae4f09adbee
--- /dev/null
+++ b/www/iridium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,49 @@
+--- third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig 2026-02-19 10:23:43 UTC
++++ third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c
+@@ -127,9 +127,45 @@ static int arm_get_cpu_caps(void) {
+ return flags;
+ }
+
+-#elif defined(__linux__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++#elif defined(__OpenBSD__)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
+
++static int arm_get_cpu_caps(void) {
++ int flags = 0;
++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++ uint64_t cpu_id = 0;
++ size_t len = sizeof(cpu_id);
++
++ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A.
++
++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++ return flags;
++
++ if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++ flags |= HAS_ARM_CRC32;
++
++ return flags;
++}
++
++#elif defined(__linux__) || defined(__FreeBSD__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++
+ #include <sys/auxv.h>
++
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++ /* Only AT_HWCAP* return unsigned long */
++ if (type != AT_HWCAP && type != AT_HWCAP2) {
++ return 0;
++ }
++
++ unsigned long ret = 0;
++ elf_aux_info(type, &ret, sizeof(ret));
++ return ret;
++}
++#endif
+
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.
diff --git a/www/ungoogled-chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c b/www/ungoogled-chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
new file mode 100644
index 000000000000..2ae4f09adbee
--- /dev/null
+++ b/www/ungoogled-chromium/files/patch-third__party_libaom_source_libaom_aom__ports_aarch64__cpudetect.c
@@ -0,0 +1,49 @@
+--- third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c.orig 2026-02-19 10:23:43 UTC
++++ third_party/libaom/source/libaom/aom_ports/aarch64_cpudetect.c
+@@ -127,9 +127,45 @@ static int arm_get_cpu_caps(void) {
+ return flags;
+ }
+
+-#elif defined(__linux__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++#elif defined(__OpenBSD__)
++#include <sys/sysctl.h>
++#include <machine/cpu.h>
++#include <machine/armreg.h>
+
++static int arm_get_cpu_caps(void) {
++ int flags = 0;
++ int isar0_mib[] = { CTL_MACHDEP, CPU_ID_AA64ISAR0 };
++ uint64_t cpu_id = 0;
++ size_t len = sizeof(cpu_id);
++
++ flags |= HAS_NEON; // Neon is mandatory in Armv8.0-A.
++
++ if (sysctl(isar0_mib, 2, &cpu_id, &len, NULL, 0) < 0)
++ return flags;
++
++ if (ID_AA64ISAR0_CRC32(cpu_id) >= ID_AA64ISAR0_CRC32_BASE)
++ flags |= HAS_ARM_CRC32;
++
++ return flags;
++}
++
++#elif defined(__linux__) || defined(__FreeBSD__) // end defined(AOM_USE_ANDROID_CPU_FEATURES)
++
+ #include <sys/auxv.h>
++
++#if defined(__FreeBSD__)
++static unsigned long getauxval(unsigned long type)
++{
++ /* Only AT_HWCAP* return unsigned long */
++ if (type != AT_HWCAP && type != AT_HWCAP2) {
++ return 0;
++ }
++
++ unsigned long ret = 0;
++ elf_aux_info(type, &ret, sizeof(ret));
++ return ret;
++}
++#endif
+
+ // Define hwcap values ourselves: building with an old auxv header where these
+ // hwcap values are not defined should not prevent features from being enabled.