--- third_party/cpuinfo/CMakeLists.txt.orig	2024-10-29 18:00:44 UTC
+++ third_party/cpuinfo/CMakeLists.txt
@@ -95,7 +95,7 @@ IF(NOT CMAKE_SYSTEM_PROCESSOR)
       "cpuinfo will compile, but cpuinfo_initialize() will always fail.")
     SET(CPUINFO_SUPPORTED_PLATFORM FALSE)
   ENDIF()
-ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$")
+ELSEIF(NOT CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?|armv[5-8].*|aarch64|arm64.*|ARM64.*|riscv(32|64))$")
   MESSAGE(WARNING
     "Target processor architecture \"${CPUINFO_TARGET_PROCESSOR}\" is not supported in cpuinfo. "
     "cpuinfo will compile, but cpuinfo_initialize() will always fail.")
@@ -161,7 +161,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM)
 SET(CPUINFO_SRCS src/api.c src/cache.c src/init.c src/log.c)
 
 IF(CPUINFO_SUPPORTED_PLATFORM)
-  IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND (CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$" OR IOS_ARCH MATCHES "^(i386|x86_64)$"))
+  IF(NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten" AND (CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?)$" OR IOS_ARCH MATCHES "^(i386|x86_64)$"))
     LIST(APPEND CPUINFO_SRCS
       src/x86/init.c
       src/x86/info.c
@@ -373,7 +373,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_T
 # ---[ cpuinfo mock library and mock tests
 IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_MOCK_TESTS)
   SET(CPUINFO_MOCK_SRCS "${CPUINFO_SRCS}")
-  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
+  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?)$")
     LIST(APPEND CPUINFO_MOCK_SRCS src/x86/mockcpuid.c)
   ENDIF()
   IF(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
@@ -822,7 +822,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_UNIT_T
     ADD_TEST(NAME get-current-test COMMAND get-current-test)
   ENDIF()
 
-  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
+  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?)$")
     ADD_EXECUTABLE(brand-string-test test/name/brand-string.cc)
     CPUINFO_TARGET_ENABLE_CXX11(brand-string-test)
     CPUINFO_TARGET_RUNTIME_LIBRARY(brand-string-test)
@@ -878,7 +878,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS)
   TARGET_LINK_LIBRARIES(cache-info PRIVATE cpuinfo)
   INSTALL(TARGETS cache-info RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
 
-  IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
+  IF(CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux|FreeBSD)$" AND CMAKE_SYSTEM_PROCESSOR MATCHES "^(armv[5-8].*|aarch64)$")
     ADD_EXECUTABLE(auxv-dump tools/auxv-dump.c)
     CPUINFO_TARGET_ENABLE_C99(auxv-dump)
     CPUINFO_TARGET_RUNTIME_LIBRARY(auxv-dump)
@@ -889,7 +889,7 @@ IF(CPUINFO_SUPPORTED_PLATFORM AND CPUINFO_BUILD_TOOLS)
     CPUINFO_TARGET_RUNTIME_LIBRARY(cpuinfo-dump)
   ENDIF()
 
-  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|AMD64|x86(_64)?)$")
+  IF(CPUINFO_TARGET_PROCESSOR MATCHES "^(i[3-6]86|amd64|x86(_64)?)$")
     ADD_EXECUTABLE(cpuid-dump tools/cpuid-dump.c)
     CPUINFO_TARGET_ENABLE_C99(cpuid-dump)
     CPUINFO_TARGET_RUNTIME_LIBRARY(cpuid-dump)
