git: 79018ce2de92 - main - devel/cpu_features: Update to 0.11.0

From: Steven Kreuzer <skreuzer_at_FreeBSD.org>
Date: Mon, 07 Sep 2026 15:09:56 UTC
The branch main has been updated by skreuzer:

URL: https://cgit.FreeBSD.org/ports/commit/?id=79018ce2de9297bb9210f5e840c71c1b9c093c77

commit 79018ce2de9297bb9210f5e840c71c1b9c093c77
Author:     Steven Kreuzer <skreuzer@FreeBSD.org>
AuthorDate: 2026-09-07 12:12:02 +0000
Commit:     Steven Kreuzer <skreuzer@FreeBSD.org>
CommitDate: 2026-09-07 14:59:23 +0000

    devel/cpu_features: Update to 0.11.0
    
    Changelog:      https://github.com/google/cpu_features/releases/tag/v0.11.0
    
    FreeBSD is now supported natively for x86, aarch64 and arm, and detection for
    AMD Zen 5, Intel Arrow Lake and Lunar Lake microarchitectures was added.
---
 devel/cpu_features/Makefile                        |  2 +-
 devel/cpu_features/distinfo                        |  6 +--
 devel/cpu_features/files/patch-BUILD.bazel         | 20 ----------
 devel/cpu_features/files/patch-src_hwcaps.c        | 44 ----------------------
 .../patch-src_impl__aarch64__linux__or__android.c  | 23 -----------
 .../patch-src_impl__arm__linux__or__android.c      | 21 -----------
 6 files changed, 4 insertions(+), 112 deletions(-)

diff --git a/devel/cpu_features/Makefile b/devel/cpu_features/Makefile
index 2ef7c074780e..54982baa189b 100644
--- a/devel/cpu_features/Makefile
+++ b/devel/cpu_features/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	cpu_features
 DISTVERSIONPREFIX=	v
-DISTVERSION=	0.9.0
+DISTVERSION=	0.11.0
 CATEGORIES=	devel
 
 MAINTAINER=	skreuzer@FreeBSD.org
diff --git a/devel/cpu_features/distinfo b/devel/cpu_features/distinfo
index 72032136156a..911d6c738304 100644
--- a/devel/cpu_features/distinfo
+++ b/devel/cpu_features/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1713392514
-SHA256 (google-cpu_features-v0.9.0_GH0.tar.gz) = bdb3484de8297c49b59955c3b22dba834401bc2df984ef5cfc17acbe69c5018e
-SIZE (google-cpu_features-v0.9.0_GH0.tar.gz) = 109259
+TIMESTAMP = 1788747667
+SHA256 (google-cpu_features-v0.11.0_GH0.tar.gz) = ab2463f2d38fcaff1ce806be8e4c91333449931f5e02009d543b2569a3fa471a
+SIZE (google-cpu_features-v0.11.0_GH0.tar.gz) = 116873
diff --git a/devel/cpu_features/files/patch-BUILD.bazel b/devel/cpu_features/files/patch-BUILD.bazel
deleted file mode 100644
index e38309b54b5b..000000000000
--- a/devel/cpu_features/files/patch-BUILD.bazel
+++ /dev/null
@@ -1,20 +0,0 @@
---- BUILD.bazel.orig	2023-09-14 12:15:33 UTC
-+++ BUILD.bazel
-@@ -223,7 +223,7 @@ cc_library(
-             "src/impl_aarch64_windows.c",
-         ],
-         PLATFORM_CPU_MIPS: ["src/impl_mips_linux_or_android.c"],
--        PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c"],
-+        PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c", "src/impl_ppc_freebsd.c"],
-         PLATFORM_CPU_RISCV32: ["src/impl_riscv_linux.c"],
-         PLATFORM_CPU_RISCV64: ["src/impl_riscv_linux.c"],
-     }),
-@@ -283,7 +283,7 @@ cc_library(
-             "src/impl_aarch64_windows.c",
-         ],
-         PLATFORM_CPU_MIPS: ["src/impl_mips_linux_or_android.c"],
--        PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c"],
-+        PLATFORM_CPU_PPC: ["src/impl_ppc_linux.c", "src/impl_ppc_freebsd.c"],
-         PLATFORM_CPU_RISCV32: ["src/impl_riscv_linux.c"],
-         PLATFORM_CPU_RISCV64: ["src/impl_riscv_linux.c"],
-     }),
diff --git a/devel/cpu_features/files/patch-src_hwcaps.c b/devel/cpu_features/files/patch-src_hwcaps.c
deleted file mode 100644
index 4213c3b732de..000000000000
--- a/devel/cpu_features/files/patch-src_hwcaps.c
+++ /dev/null
@@ -1,44 +0,0 @@
---- src/hwcaps.c.orig	2023-09-14 12:15:33 UTC
-+++ src/hwcaps.c
-@@ -55,12 +55,16 @@ const char* CpuFeatures_GetBasePlatformPointer(void);
- // Implementation of GetElfHwcapFromGetauxval
- ////////////////////////////////////////////////////////////////////////////////
- 
--#define AT_HWCAP 16
--#define AT_HWCAP2 26
--#define AT_PLATFORM 15
--#define AT_BASE_PLATFORM 24
-+#if defined(CPU_FEATURES_OS_FREEBSD)
-+#include <sys/auxv.h>
-+static unsigned long GetElfHwcapFromGetauxval(uint32_t hwcap_type) {
-+  unsigned long val = 0;
- 
--#if defined(HAVE_STRONG_GETAUXVAL)
-+  elf_aux_info(hwcap_type, &val, sizeof val);
-+
-+  return val;
-+}
-+#elif defined(HAVE_STRONG_GETAUXVAL)
- #include <sys/auxv.h>
- static unsigned long GetElfHwcapFromGetauxval(uint32_t hwcap_type) {
-   return getauxval(hwcap_type);
-@@ -159,11 +163,19 @@ const char *CpuFeatures_GetPlatformPointer(void) {
- }
- 
- const char *CpuFeatures_GetPlatformPointer(void) {
-+#ifdef AT_PLATFORM
-   return (const char *)GetHardwareCapabilitiesFor(AT_PLATFORM);
-+#else
-+  return NULL;
-+#endif
- }
- 
- const char *CpuFeatures_GetBasePlatformPointer(void) {
-+#ifdef AT_BASE_PLATFORM
-   return (const char *)GetHardwareCapabilitiesFor(AT_BASE_PLATFORM);
-+#else
-+  return NULL;
-+#endif
- }
- 
- #endif  // CPU_FEATURES_TEST
diff --git a/devel/cpu_features/files/patch-src_impl__aarch64__linux__or__android.c b/devel/cpu_features/files/patch-src_impl__aarch64__linux__or__android.c
deleted file mode 100644
index f3efc4ed6e47..000000000000
--- a/devel/cpu_features/files/patch-src_impl__aarch64__linux__or__android.c
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/impl_aarch64_linux_or_android.c.orig	2025-09-21 09:37:44 UTC
-+++ src/impl_aarch64_linux_or_android.c
-@@ -15,7 +15,7 @@
- #include "cpu_features_macros.h"
- 
- #ifdef CPU_FEATURES_ARCH_AARCH64
--#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID)
-+#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) || defined(CPU_FEATURES_OS_FREEBSD)
- 
- #include "impl_aarch64__base_implementation.inl"
- 
-@@ -43,7 +43,11 @@ static void FillProcCpuInfoData(Aarch64Info* const inf
- }
- 
- static void FillProcCpuInfoData(Aarch64Info* const info) {
-+#ifdef CPU_FEATURES_OS_FREEBSD
-+  const int fd = CpuFeatures_OpenFile("/compat/linux/proc/cpuinfo");
-+#else
-   const int fd = CpuFeatures_OpenFile("/proc/cpuinfo");
-+#endif
-   if (fd >= 0) {
-     StackLineReader reader;
-     StackLineReader_Initialize(&reader, fd);
diff --git a/devel/cpu_features/files/patch-src_impl__arm__linux__or__android.c b/devel/cpu_features/files/patch-src_impl__arm__linux__or__android.c
deleted file mode 100644
index 65c638f9307c..000000000000
--- a/devel/cpu_features/files/patch-src_impl__arm__linux__or__android.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- src/impl_arm_linux_or_android.c.orig	2025-09-21 09:55:17 UTC
-+++ src/impl_arm_linux_or_android.c
-@@ -15,7 +15,7 @@
- #include "cpu_features_macros.h"
- 
- #ifdef CPU_FEATURES_ARCH_ARM
--#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID)
-+#if defined(CPU_FEATURES_OS_LINUX) || defined(CPU_FEATURES_OS_ANDROID) || defined(CPU_FEATURES_OS_FREEBSD)
- 
- #include "cpuinfo_arm.h"
- 
-@@ -195,7 +195,9 @@ ArmInfo GetArmInfo(void) {
-   ArmInfo info = kEmptyArmInfo;
-   ProcCpuInfoData proc_cpu_info_data = kEmptyProcCpuInfoData;
- 
-+#ifndef CPU_FEATURES_OS_FREEBSD
-   FillProcCpuInfoData(&info, &proc_cpu_info_data);
-+#endif
-   const HardwareCapabilities hwcaps = CpuFeatures_GetHardwareCapabilities();
-   for (size_t i = 0; i < ARM_LAST_; ++i) {
-     if (CpuFeatures_IsHwCapsSet(kHardwareCapabilities[i], hwcaps)) {