Re: UPDATE: aom 3.8.1

2024-03-05 Thread Peter Hessler
On 2024 Mar 03 (Sun) at 17:37:28 -0500 (-0500), Brad Smith wrote:
:On Sun, Mar 03, 2024 at 04:26:14PM +0100, Peter Hessler wrote:
:> This fails to build for me on arm64:
:> 
:> ===>  Configuring for aom-3.8.1
:> -- The C compiler identification is Clang 16.0.6
:> -- The CXX compiler identification is Clang 16.0.6
:> -- Detecting C compiler ABI info
:> -- Detecting C compiler ABI info - done
:> -- Check for working C compiler: /usr/obj/ports/aom-3.8.1/bin/cc - skipped
:> -- Detecting C compile features
:> -- Detecting C compile features - done
:> -- Detecting CXX compiler ABI info
:> -- Detecting CXX compiler ABI info - done
:> -- Check for working CXX compiler: /usr/obj/ports/aom-3.8.1/bin/c++ - skipped
:> -- Detecting CXX compile features
:> -- Detecting CXX compile features - done
:> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
:> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
:> -- Looking for pthread_create in pthreads
:> -- Looking for pthread_create in pthreads - not found
:> -- Looking for pthread_create in pthread
:> -- Looking for pthread_create in pthread - found
:> -- Found Threads: TRUE  
:> --- aom_configure: Detected CPU: arm64
:> -- The ASM compiler identification is unknown
:> -- Found assembler: as
:> CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
:>   The CMAKE_ASM_COMPILER:
:> 
:> as
:> 
:>   is not a full path and was not found in the PATH.
:> 
:>   Tell CMake where to find the compiler by setting either the environment
:>   variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
:>   to the compiler, or to the compiler name if it is in the PATH.
:> Call Stack (most recent call first):
:>   CMakeLists.txt:73 (include)
:> 
:> 
:> -- Warning: Did not find file Compiler/-ASM
:> -- Configuring incomplete, errors occurred!
:> 
:> 
:> note that there is no "as" or "llvm-as" binary on arm64.
:
:Try the following.
:

Yup, this works.  I've committed it.

thanks!


:
:Index: patches/patch-build_cmake_aom_configure_cmake
:===
:RCS file: patches/patch-build_cmake_aom_configure_cmake
:diff -N patches/patch-build_cmake_aom_configure_cmake
:--- /dev/null  1 Jan 1970 00:00:00 -
:+++ patches/patch-build_cmake_aom_configure_cmake  3 Mar 2024 21:29:37 
-
:@@ -0,0 +1,16 @@
:+ARM uses compiler intrinsics, so don't require GNU as.
:+
:+Index: build/cmake/aom_configure.cmake
:+--- build/cmake/aom_configure.cmake.orig
: build/cmake/aom_configure.cmake
:+@@ -192,6 +192,10 @@ elseif(AOM_TARGET_CPU MATCHES "arm")
:+ if(NOT CMAKE_ASM_COMPILER)
:+   set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -c -mimplicit-it=always)
:+ endif()
:++  elseif(AOM_TARGET_SYSTEM STREQUAL "OpenBSD")
:++if(NOT CMAKE_ASM_COMPILER)
:++  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
:++endif()
:+   else()
:+ if(NOT CMAKE_ASM_COMPILER)
:+   set(CMAKE_ASM_COMPILER as)
:

-- 
Any time things appear to be going better, you have overlooked
something.



Re: UPDATE: aom 3.8.1

2024-03-03 Thread Brad Smith
On Sun, Mar 03, 2024 at 04:26:14PM +0100, Peter Hessler wrote:
> This fails to build for me on arm64:
> 
> ===>  Configuring for aom-3.8.1
> -- The C compiler identification is Clang 16.0.6
> -- The CXX compiler identification is Clang 16.0.6
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /usr/obj/ports/aom-3.8.1/bin/cc - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /usr/obj/ports/aom-3.8.1/bin/c++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE  
> --- aom_configure: Detected CPU: arm64
> -- The ASM compiler identification is unknown
> -- Found assembler: as
> CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
>   The CMAKE_ASM_COMPILER:
> 
> as
> 
>   is not a full path and was not found in the PATH.
> 
>   Tell CMake where to find the compiler by setting either the environment
>   variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
>   to the compiler, or to the compiler name if it is in the PATH.
> Call Stack (most recent call first):
>   CMakeLists.txt:73 (include)
> 
> 
> -- Warning: Did not find file Compiler/-ASM
> -- Configuring incomplete, errors occurred!
> 
> 
> note that there is no "as" or "llvm-as" binary on arm64.

Try the following.


Index: patches/patch-build_cmake_aom_configure_cmake
===
RCS file: patches/patch-build_cmake_aom_configure_cmake
diff -N patches/patch-build_cmake_aom_configure_cmake
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-build_cmake_aom_configure_cmake   3 Mar 2024 21:29:37 
-
@@ -0,0 +1,16 @@
+ARM uses compiler intrinsics, so don't require GNU as.
+
+Index: build/cmake/aom_configure.cmake
+--- build/cmake/aom_configure.cmake.orig
 build/cmake/aom_configure.cmake
+@@ -192,6 +192,10 @@ elseif(AOM_TARGET_CPU MATCHES "arm")
+ if(NOT CMAKE_ASM_COMPILER)
+   set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER} -c -mimplicit-it=always)
+ endif()
++  elseif(AOM_TARGET_SYSTEM STREQUAL "OpenBSD")
++if(NOT CMAKE_ASM_COMPILER)
++  set(CMAKE_ASM_COMPILER ${CMAKE_C_COMPILER})
++endif()
+   else()
+ if(NOT CMAKE_ASM_COMPILER)
+   set(CMAKE_ASM_COMPILER as)



Re: UPDATE: aom 3.8.1

2024-03-03 Thread Jan Beich
Stuart Henderson  writes:

> On 2024/03/03 16:26, Peter Hessler wrote:
>> --- aom_configure: Detected CPU: arm64
>> -- The ASM compiler identification is unknown
>> -- Found assembler: as
>> CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
>>   The CMAKE_ASM_COMPILER:
>> 
>> as
>> 
>>   is not a full path and was not found in the PATH.
[...]
> It could possibly depend on devel/gas (there is a newer version in
> devel/binutils, but other ports are depending on devel/gas and the two
> conflict, so better take the one which is already used) ..

Another option is to remove unused dependency from the source e.g.,

https://github.com/freebsd/freebsd-ports/blob/main/multimedia/aom/files/patch-build_cmake_aom__configure.cmake



Re: UPDATE: aom 3.8.1

2024-03-03 Thread Stuart Henderson
On 2024/03/03 16:26, Peter Hessler wrote:
> This fails to build for me on arm64:
> 
> ===>  Configuring for aom-3.8.1
> -- The C compiler identification is Clang 16.0.6
> -- The CXX compiler identification is Clang 16.0.6
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /usr/obj/ports/aom-3.8.1/bin/cc - skipped
> -- Detecting C compile features
> -- Detecting C compile features - done
> -- Detecting CXX compiler ABI info
> -- Detecting CXX compiler ABI info - done
> -- Check for working CXX compiler: /usr/obj/ports/aom-3.8.1/bin/c++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
> -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Found Threads: TRUE  
> --- aom_configure: Detected CPU: arm64
> -- The ASM compiler identification is unknown
> -- Found assembler: as
> CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
>   The CMAKE_ASM_COMPILER:
> 
> as
> 
>   is not a full path and was not found in the PATH.
> 
>   Tell CMake where to find the compiler by setting either the environment
>   variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
>   to the compiler, or to the compiler name if it is in the PATH.
> Call Stack (most recent call first):
>   CMakeLists.txt:73 (include)
> 
> 
> -- Warning: Did not find file Compiler/-ASM
> -- Configuring incomplete, errors occurred!
> 
> 
> note that there is no "as" or "llvm-as" binary on arm64.

It could possibly depend on devel/gas (there is a newer version in
devel/binutils, but other ports are depending on devel/gas and the two
conflict, so better take the one which is already used) ..

llvm-as exists in the ports version, but AFAIK it is for something else.



Re: UPDATE: aom 3.8.1

2024-03-03 Thread Peter Hessler
This fails to build for me on arm64:

===>  Configuring for aom-3.8.1
-- The C compiler identification is Clang 16.0.6
-- The CXX compiler identification is Clang 16.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/obj/ports/aom-3.8.1/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/obj/ports/aom-3.8.1/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
--- aom_configure: Detected CPU: arm64
-- The ASM compiler identification is unknown
-- Found assembler: as
CMake Error at build/cmake/aom_configure.cmake:212 (enable_language):
  The CMAKE_ASM_COMPILER:

as

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:73 (include)


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!


note that there is no "as" or "llvm-as" binary on arm64.



On 2024 Feb 28 (Wed) at 16:40:02 + (+), Stuart Henderson wrote:
:On 2024/02/28 17:28, Jan Beich wrote:
:> Brad Smith  writes:
:> 
:> >  GH_ACCOUNT=   jbeich
:> >  GH_PROJECT=   aom
:> > -GH_TAGNAME=   v3.6.1
:> > +GH_TAGNAME=   v3.8.1
:> 
:> If you don't use snapshots or RCs better migrate off my GitHub mirror.
:> According to Repology the download link would be
:> 
:> https://storage.googleapis.com/aom-releases/libaom-3.8.1.tar.gz
:> 
:
:Updated for that. No difference in the contents of the tars after
:extracting.
:
:Index: Makefile
:===
:RCS file: /cvs/ports/multimedia/aom/Makefile,v
:retrieving revision 1.20
:diff -u -p -r1.20 Makefile
:--- Makefile   29 May 2023 17:52:01 -  1.20
:+++ Makefile   28 Feb 2024 16:39:18 -
:@@ -1,13 +1,14 @@
: COMMENT=  Alliance for Open Media AV1 video codec
: 
:-GH_ACCOUNT=   jbeich
:-GH_PROJECT=   aom
:-GH_TAGNAME=   v3.6.1
:+V=3.8.1
:+DISTNAME= libaom-$V
:+PKGNAME=  aom-$V
: CATEGORIES=   multimedia
: 
:-SHARED_LIBS=  aom 4.0
:+SHARED_LIBS=  aom 4.1
: 
: HOMEPAGE= https://aomedia.org/
:+SITES=https://storage.googleapis.com/aom-releases/
: 
: MAINTAINER=   Brad Smith 
: 
:Index: distinfo
:===
:RCS file: /cvs/ports/multimedia/aom/distinfo,v
:retrieving revision 1.17
:diff -u -p -r1.17 distinfo
:--- distinfo   29 May 2023 17:52:01 -  1.17
:+++ distinfo   28 Feb 2024 16:39:18 -
:@@ -1,2 +1,2 @@
:-SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
:-SIZE (aom-3.6.1.tar.gz) = 5269397
:+SHA256 (libaom-3.8.1.tar.gz) = 3txlBggSp9+AHAJwov6L13PGuwtgHyFE7PvGLcD2cco=
:+SIZE (libaom-3.8.1.tar.gz) = 5450909
:Index: patches/patch-CMakeLists_txt
:===
:RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
:retrieving revision 1.5
:diff -u -p -r1.5 patch-CMakeLists_txt
:--- patches/patch-CMakeLists_txt   9 Apr 2023 06:17:17 -   1.5
:+++ patches/patch-CMakeLists_txt   28 Feb 2024 16:39:18 -
:@@ -1,12 +1,13 @@
: Index: CMakeLists.txt
: --- CMakeLists.txt.orig
: +++ CMakeLists.txt
:-@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
:- endif()
:- 
:- if(BUILD_SHARED_LIBS)
:--  if(NOT WIN32 AND NOT APPLE)
:-+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
:+@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
:+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
:+   if(NOT WIN32
:+  AND NOT APPLE
:+- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
:++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
:++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
:  # The -z defs linker option reports unresolved symbol references from 
object
:  # files when building a shared library.
:  if("${CMAKE_VERSION}" VERSION_LESS "3.13")
:Index: patches/patch-aom_ports_aarch32_cpudetect_c
:===
:RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
:diff -N patches/patch-aom_ports_aarch32_cpudetect_c
:--- /dev/null  1 Jan 1970 00:00:00 -
:+++ patches/patch-aom_ports_aarch32_cpudetect_c28 Feb 2024 16:39:18 

Re: UPDATE: aom 3.8.1

2024-02-28 Thread Stuart Henderson
On 2024/02/28 17:28, Jan Beich wrote:
> Brad Smith  writes:
> 
> >  GH_ACCOUNT=jbeich
> >  GH_PROJECT=aom
> > -GH_TAGNAME=v3.6.1
> > +GH_TAGNAME=v3.8.1
> 
> If you don't use snapshots or RCs better migrate off my GitHub mirror.
> According to Repology the download link would be
> 
> https://storage.googleapis.com/aom-releases/libaom-3.8.1.tar.gz
> 

Updated for that. No difference in the contents of the tars after
extracting.

Index: Makefile
===
RCS file: /cvs/ports/multimedia/aom/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile29 May 2023 17:52:01 -  1.20
+++ Makefile28 Feb 2024 16:39:18 -
@@ -1,13 +1,14 @@
 COMMENT=   Alliance for Open Media AV1 video codec
 
-GH_ACCOUNT=jbeich
-GH_PROJECT=aom
-GH_TAGNAME=v3.6.1
+V= 3.8.1
+DISTNAME=  libaom-$V
+PKGNAME=   aom-$V
 CATEGORIES=multimedia
 
-SHARED_LIBS=   aom 4.0
+SHARED_LIBS=   aom 4.1
 
 HOMEPAGE=  https://aomedia.org/
+SITES= https://storage.googleapis.com/aom-releases/
 
 MAINTAINER=Brad Smith 
 
Index: distinfo
===
RCS file: /cvs/ports/multimedia/aom/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo29 May 2023 17:52:01 -  1.17
+++ distinfo28 Feb 2024 16:39:18 -
@@ -1,2 +1,2 @@
-SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
-SIZE (aom-3.6.1.tar.gz) = 5269397
+SHA256 (libaom-3.8.1.tar.gz) = 3txlBggSp9+AHAJwov6L13PGuwtgHyFE7PvGLcD2cco=
+SIZE (libaom-3.8.1.tar.gz) = 5450909
Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt9 Apr 2023 06:17:17 -   1.5
+++ patches/patch-CMakeLists_txt28 Feb 2024 16:39:18 -
@@ -1,12 +1,13 @@
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
- endif()
- 
- if(BUILD_SHARED_LIBS)
--  if(NOT WIN32 AND NOT APPLE)
-+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
+   if(NOT WIN32
+  AND NOT APPLE
+- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
  # The -z defs linker option reports unresolved symbol references from 
object
  # files when building a shared library.
  if("${CMAKE_VERSION}" VERSION_LESS "3.13")
Index: patches/patch-aom_ports_aarch32_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
diff -N patches/patch-aom_ports_aarch32_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch32_cpudetect_c 28 Feb 2024 16:39:18 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch32_cpudetect.c
+--- aom_ports/aarch32_cpudetect.c.orig
 aom_ports/aarch32_cpudetect.c
+@@ -12,7 +12,7 @@
+ 
+ #include "arm_cpudetect.h"
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -25,7 +25,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ static int arm_get_cpu_caps(void) {
+   int flags = 0;
Index: patches/patch-aom_ports_aarch64_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch64_cpudetect_c
diff -N patches/patch-aom_ports_aarch64_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch64_cpudetect_c 28 Feb 2024 16:39:18 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch64_cpudetect.c
+--- aom_ports/aarch64_cpudetect.c.orig
 aom_ports/aarch64_cpudetect.c
+@@ -15,7 +15,7 @@
+ #include 
+ #endif
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -28,7 +28,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ // sysctlbyname() 

Re: UPDATE: aom 3.8.1

2024-02-28 Thread Mark Kettenis
> Date: Wed, 28 Feb 2024 16:17:54 +
> From: Stuart Henderson 
> 
> +cc kettenis for the IBT patch

Looks good to me.

> On 2024/02/28 16:15, Stuart Henderson wrote:
> > On 2024/02/23 17:19, Brad Smith wrote:
> > > Here is an update to aom 3.8.1.
> > > 
> > > https://aomedia.googlesource.com/aom/+/refs/heads/main/CHANGELOG
> > 
> > Here's a tweaked version adding yasm-compatible endbr64 magic to
> > x86inc.asm. Similar to what I added to audio/deadbeef but the
> > definitions in aom_config.asm use a different label (and setting to
> > 0 or 1 rather than checking for presence/absence).
> > 
> > Still builds on i386.
> > 
> > With this I can encode from one of the xiph.org test YUV4MPEG files
> > at https://media.xiph.org/video/derf/ on 11th gen intel without crashing,
> > which I couldn't do before.
> > 
> > $ aomenc -o test.webm -w 352 -h 288 --limit=100 --cpu-used=4 akiyo_cif.y4m
> > 
> 
> Index: Makefile
> ===
> RCS file: /cvs/ports/multimedia/aom/Makefile,v
> retrieving revision 1.20
> diff -u -p -r1.20 Makefile
> --- Makefile  29 May 2023 17:52:01 -  1.20
> +++ Makefile  28 Feb 2024 16:06:36 -
> @@ -2,10 +2,10 @@ COMMENT=Alliance for Open Media AV1 vid
>  
>  GH_ACCOUNT=  jbeich
>  GH_PROJECT=  aom
> -GH_TAGNAME=  v3.6.1
> +GH_TAGNAME=  v3.8.1
>  CATEGORIES=  multimedia
>  
> -SHARED_LIBS= aom 4.0
> +SHARED_LIBS= aom 4.1
>  
>  HOMEPAGE=https://aomedia.org/
>  
> Index: distinfo
> ===
> RCS file: /cvs/ports/multimedia/aom/distinfo,v
> retrieving revision 1.17
> diff -u -p -r1.17 distinfo
> --- distinfo  29 May 2023 17:52:01 -  1.17
> +++ distinfo  28 Feb 2024 16:06:36 -
> @@ -1,2 +1,2 @@
> -SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
> -SIZE (aom-3.6.1.tar.gz) = 5269397
> +SHA256 (aom-3.8.1.tar.gz) = Yp0PvVhlQWfSjz78LN/w5wjWgoCqWzD4F0Tn4YGo2FE=
> +SIZE (aom-3.8.1.tar.gz) = 5461300
> Index: patches/patch-CMakeLists_txt
> ===
> RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
> retrieving revision 1.5
> diff -u -p -r1.5 patch-CMakeLists_txt
> --- patches/patch-CMakeLists_txt  9 Apr 2023 06:17:17 -   1.5
> +++ patches/patch-CMakeLists_txt  28 Feb 2024 16:06:36 -
> @@ -1,12 +1,13 @@
>  Index: CMakeLists.txt
>  --- CMakeLists.txt.orig
>  +++ CMakeLists.txt
> -@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
> - endif()
> - 
> - if(BUILD_SHARED_LIBS)
> --  if(NOT WIN32 AND NOT APPLE)
> -+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
> +@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
> +   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
> +   if(NOT WIN32
> +  AND NOT APPLE
> +- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
> ++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
> ++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
>   # The -z defs linker option reports unresolved symbol references from 
> object
>   # files when building a shared library.
>   if("${CMAKE_VERSION}" VERSION_LESS "3.13")
> Index: patches/patch-aom_ports_aarch32_cpudetect_c
> ===
> RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
> diff -N patches/patch-aom_ports_aarch32_cpudetect_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-aom_ports_aarch32_cpudetect_c   28 Feb 2024 16:06:36 
> -
> @@ -0,0 +1,23 @@
> +Allow ARM CPU runtime detection code to build on OpenBSD.
> +
> +Index: aom_ports/aarch32_cpudetect.c
> +--- aom_ports/aarch32_cpudetect.c.orig
>  aom_ports/aarch32_cpudetect.c
> +@@ -12,7 +12,7 @@
> + 
> + #include "arm_cpudetect.h"
> + 
> +-#if !CONFIG_RUNTIME_CPU_DETECT
> ++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
> + 
> + static int arm_get_cpu_caps(void) {
> +   // This function should actually be a no-op. There is no way to adjust 
> any of
> +@@ -25,7 +25,7 @@ static int arm_get_cpu_caps(void) {
> +   return flags;
> + }
> + 
> +-#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT
> ++#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
> + 
> + static int arm_get_cpu_caps(void) {
> +   int flags = 0;
> Index: patches/patch-aom_ports_aarch64_cpudetect_c
> ===
> RCS file: patches/patch-aom_ports_aarch64_cpudetect_c
> diff -N patches/patch-aom_ports_aarch64_cpudetect_c
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ patches/patch-aom_ports_aarch64_cpudetect_c   28 Feb 2024 16:06:36 
> -
> @@ -0,0 +1,23 @@
> +Allow ARM CPU runtime detection code to build on OpenBSD.
> +
> +Index: aom_ports/aarch64_cpudetect.c
> +--- aom_ports/aarch64_cpudetect.c.orig
>  aom_ports/aarch64_cpudetect.c
> +@@ -15,7 +15,7 @@
> + 

Re: UPDATE: aom 3.8.1

2024-02-28 Thread Jan Beich
Brad Smith  writes:

>  GH_ACCOUNT=  jbeich
>  GH_PROJECT=  aom
> -GH_TAGNAME=  v3.6.1
> +GH_TAGNAME=  v3.8.1

If you don't use snapshots or RCs better migrate off my GitHub mirror.
According to Repology the download link would be

https://storage.googleapis.com/aom-releases/libaom-3.8.1.tar.gz



Re: UPDATE: aom 3.8.1

2024-02-28 Thread Stuart Henderson
+cc kettenis for the IBT patch

On 2024/02/28 16:15, Stuart Henderson wrote:
> On 2024/02/23 17:19, Brad Smith wrote:
> > Here is an update to aom 3.8.1.
> > 
> > https://aomedia.googlesource.com/aom/+/refs/heads/main/CHANGELOG
> 
> Here's a tweaked version adding yasm-compatible endbr64 magic to
> x86inc.asm. Similar to what I added to audio/deadbeef but the
> definitions in aom_config.asm use a different label (and setting to
> 0 or 1 rather than checking for presence/absence).
> 
> Still builds on i386.
> 
> With this I can encode from one of the xiph.org test YUV4MPEG files
> at https://media.xiph.org/video/derf/ on 11th gen intel without crashing,
> which I couldn't do before.
> 
> $ aomenc -o test.webm -w 352 -h 288 --limit=100 --cpu-used=4 akiyo_cif.y4m
> 

Index: Makefile
===
RCS file: /cvs/ports/multimedia/aom/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile29 May 2023 17:52:01 -  1.20
+++ Makefile28 Feb 2024 16:06:36 -
@@ -2,10 +2,10 @@ COMMENT=  Alliance for Open Media AV1 vid
 
 GH_ACCOUNT=jbeich
 GH_PROJECT=aom
-GH_TAGNAME=v3.6.1
+GH_TAGNAME=v3.8.1
 CATEGORIES=multimedia
 
-SHARED_LIBS=   aom 4.0
+SHARED_LIBS=   aom 4.1
 
 HOMEPAGE=  https://aomedia.org/
 
Index: distinfo
===
RCS file: /cvs/ports/multimedia/aom/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo29 May 2023 17:52:01 -  1.17
+++ distinfo28 Feb 2024 16:06:36 -
@@ -1,2 +1,2 @@
-SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
-SIZE (aom-3.6.1.tar.gz) = 5269397
+SHA256 (aom-3.8.1.tar.gz) = Yp0PvVhlQWfSjz78LN/w5wjWgoCqWzD4F0Tn4YGo2FE=
+SIZE (aom-3.8.1.tar.gz) = 5461300
Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt9 Apr 2023 06:17:17 -   1.5
+++ patches/patch-CMakeLists_txt28 Feb 2024 16:06:36 -
@@ -1,12 +1,13 @@
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
- endif()
- 
- if(BUILD_SHARED_LIBS)
--  if(NOT WIN32 AND NOT APPLE)
-+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
+   if(NOT WIN32
+  AND NOT APPLE
+- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
  # The -z defs linker option reports unresolved symbol references from 
object
  # files when building a shared library.
  if("${CMAKE_VERSION}" VERSION_LESS "3.13")
Index: patches/patch-aom_ports_aarch32_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
diff -N patches/patch-aom_ports_aarch32_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch32_cpudetect_c 28 Feb 2024 16:06:36 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch32_cpudetect.c
+--- aom_ports/aarch32_cpudetect.c.orig
 aom_ports/aarch32_cpudetect.c
+@@ -12,7 +12,7 @@
+ 
+ #include "arm_cpudetect.h"
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -25,7 +25,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ static int arm_get_cpu_caps(void) {
+   int flags = 0;
Index: patches/patch-aom_ports_aarch64_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch64_cpudetect_c
diff -N patches/patch-aom_ports_aarch64_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch64_cpudetect_c 28 Feb 2024 16:06:36 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch64_cpudetect.c
+--- aom_ports/aarch64_cpudetect.c.orig
 aom_ports/aarch64_cpudetect.c
+@@ -15,7 +15,7 @@
+ #include 
+ #endif
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -28,7 +28,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif 

Re: UPDATE: aom 3.8.1

2024-02-28 Thread Stuart Henderson
On 2024/02/23 17:19, Brad Smith wrote:
> Here is an update to aom 3.8.1.
> 
> https://aomedia.googlesource.com/aom/+/refs/heads/main/CHANGELOG

Here's a tweaked version adding yasm-compatible endbr64 magic to
x86inc.asm. Similar to what I added to audio/deadbeef but the
definitions in aom_config.asm use a different label (and setting to
0 or 1 rather than checking for presence/absence).

Still builds on i386.

With this I can encode from one of the xiph.org test YUV4MPEG files
at https://media.xiph.org/video/derf/ on 11th gen intel without crashing,
which I couldn't do before.

$ aomenc -o test.webm -w 352 -h 288 --limit=100 --cpu-used=4 akiyo_cif.y4m


Index: Makefile
===
RCS file: /cvs/ports/multimedia/aom/Makefile,v
retrieving revision 1.20
diff -u -p -r1.20 Makefile
--- Makefile29 May 2023 17:52:01 -  1.20
+++ Makefile28 Feb 2024 16:06:36 -
@@ -2,10 +2,10 @@ COMMENT=  Alliance for Open Media AV1 vid
 
 GH_ACCOUNT=jbeich
 GH_PROJECT=aom
-GH_TAGNAME=v3.6.1
+GH_TAGNAME=v3.8.1
 CATEGORIES=multimedia
 
-SHARED_LIBS=   aom 4.0
+SHARED_LIBS=   aom 4.1
 
 HOMEPAGE=  https://aomedia.org/
 
Index: distinfo
===
RCS file: /cvs/ports/multimedia/aom/distinfo,v
retrieving revision 1.17
diff -u -p -r1.17 distinfo
--- distinfo29 May 2023 17:52:01 -  1.17
+++ distinfo28 Feb 2024 16:06:36 -
@@ -1,2 +1,2 @@
-SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
-SIZE (aom-3.6.1.tar.gz) = 5269397
+SHA256 (aom-3.8.1.tar.gz) = Yp0PvVhlQWfSjz78LN/w5wjWgoCqWzD4F0Tn4YGo2FE=
+SIZE (aom-3.8.1.tar.gz) = 5461300
Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt9 Apr 2023 06:17:17 -   1.5
+++ patches/patch-CMakeLists_txt28 Feb 2024 16:06:36 -
@@ -1,12 +1,13 @@
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
- endif()
- 
- if(BUILD_SHARED_LIBS)
--  if(NOT WIN32 AND NOT APPLE)
-+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
+   if(NOT WIN32
+  AND NOT APPLE
+- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
  # The -z defs linker option reports unresolved symbol references from 
object
  # files when building a shared library.
  if("${CMAKE_VERSION}" VERSION_LESS "3.13")
Index: patches/patch-aom_ports_aarch32_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
diff -N patches/patch-aom_ports_aarch32_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch32_cpudetect_c 28 Feb 2024 16:06:36 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch32_cpudetect.c
+--- aom_ports/aarch32_cpudetect.c.orig
 aom_ports/aarch32_cpudetect.c
+@@ -12,7 +12,7 @@
+ 
+ #include "arm_cpudetect.h"
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -25,7 +25,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ static int arm_get_cpu_caps(void) {
+   int flags = 0;
Index: patches/patch-aom_ports_aarch64_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch64_cpudetect_c
diff -N patches/patch-aom_ports_aarch64_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch64_cpudetect_c 28 Feb 2024 16:06:36 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch64_cpudetect.c
+--- aom_ports/aarch64_cpudetect.c.orig
 aom_ports/aarch64_cpudetect.c
+@@ -15,7 +15,7 @@
+ #include 
+ #endif
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -28,7 +28,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT 

UPDATE: aom 3.8.1

2024-02-23 Thread Brad Smith
Here is an update to aom 3.8.1.


https://aomedia.googlesource.com/aom/+/refs/heads/main/CHANGELOG


Index: Makefile
===
RCS file: /cvs/ports/multimedia/aom/Makefile,v
retrieving revision 1.20
diff -u -p -u -p -r1.20 Makefile
--- Makefile29 May 2023 17:52:01 -  1.20
+++ Makefile23 Feb 2024 22:14:18 -
@@ -2,10 +2,10 @@ COMMENT=  Alliance for Open Media AV1 vid
 
 GH_ACCOUNT=jbeich
 GH_PROJECT=aom
-GH_TAGNAME=v3.6.1
+GH_TAGNAME=v3.8.1
 CATEGORIES=multimedia
 
-SHARED_LIBS=   aom 4.0
+SHARED_LIBS=   aom 4.1
 
 HOMEPAGE=  https://aomedia.org/
 
Index: distinfo
===
RCS file: /cvs/ports/multimedia/aom/distinfo,v
retrieving revision 1.17
diff -u -p -u -p -r1.17 distinfo
--- distinfo29 May 2023 17:52:01 -  1.17
+++ distinfo23 Feb 2024 22:14:18 -
@@ -1,2 +1,2 @@
-SHA256 (aom-3.6.1.tar.gz) = Z5xBtBpQucWo+qG6kZ4MI5quf+hXUl4iP/IMVpl/EZ8=
-SIZE (aom-3.6.1.tar.gz) = 5269397
+SHA256 (aom-3.8.1.tar.gz) = Yp0PvVhlQWfSjz78LN/w5wjWgoCqWzD4F0Tn4YGo2FE=
+SIZE (aom-3.8.1.tar.gz) = 5461300
Index: patches/patch-CMakeLists_txt
===
RCS file: /cvs/ports/multimedia/aom/patches/patch-CMakeLists_txt,v
retrieving revision 1.5
diff -u -p -u -p -r1.5 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt9 Apr 2023 06:17:17 -   1.5
+++ patches/patch-CMakeLists_txt23 Feb 2024 22:14:18 -
@@ -1,12 +1,13 @@
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -824,7 +824,7 @@ if(ENABLE_EXAMPLES AND "${CMAKE_GENERATOR}" MATCHES "M
- endif()
- 
- if(BUILD_SHARED_LIBS)
--  if(NOT WIN32 AND NOT APPLE)
-+  if(NOT WIN32 AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
+@@ -828,7 +828,8 @@ if(BUILD_SHARED_LIBS)
+   # https://clang.llvm.org/docs/AddressSanitizer.html#usage.
+   if(NOT WIN32
+  AND NOT APPLE
+- AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE))
++ AND NOT (CMAKE_C_COMPILER_ID MATCHES "Clang" AND SANITIZE)
++ AND NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD")
  # The -z defs linker option reports unresolved symbol references from 
object
  # files when building a shared library.
  if("${CMAKE_VERSION}" VERSION_LESS "3.13")
Index: patches/patch-aom_ports_aarch32_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch32_cpudetect_c
diff -N patches/patch-aom_ports_aarch32_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch32_cpudetect_c 23 Feb 2024 22:14:18 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch32_cpudetect.c
+--- aom_ports/aarch32_cpudetect.c.orig
 aom_ports/aarch32_cpudetect.c
+@@ -12,7 +12,7 @@
+ 
+ #include "arm_cpudetect.h"
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -25,7 +25,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(_MSC_VER)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ static int arm_get_cpu_caps(void) {
+   int flags = 0;
Index: patches/patch-aom_ports_aarch64_cpudetect_c
===
RCS file: patches/patch-aom_ports_aarch64_cpudetect_c
diff -N patches/patch-aom_ports_aarch64_cpudetect_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-aom_ports_aarch64_cpudetect_c 23 Feb 2024 22:14:18 -
@@ -0,0 +1,23 @@
+Allow ARM CPU runtime detection code to build on OpenBSD.
+
+Index: aom_ports/aarch64_cpudetect.c
+--- aom_ports/aarch64_cpudetect.c.orig
 aom_ports/aarch64_cpudetect.c
+@@ -15,7 +15,7 @@
+ #include 
+ #endif
+ 
+-#if !CONFIG_RUNTIME_CPU_DETECT
++#if !CONFIG_RUNTIME_CPU_DETECT || defined(__OpenBSD__)
+ 
+ static int arm_get_cpu_caps(void) {
+   // This function should actually be a no-op. There is no way to adjust any 
of
+@@ -28,7 +28,7 @@ static int arm_get_cpu_caps(void) {
+   return flags;
+ }
+ 
+-#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT
++#elif defined(__APPLE__)  // end !CONFIG_RUNTIME_CPU_DETECT || __OpenBSD__
+ 
+ // sysctlbyname() parameter documentation for instruction set characteristics:
+ // 
https://developer.apple.com/documentation/kernel/1387446-sysctlbyname/determining_instruction_set_characteristics
Index: patches/patch-aom_ports_arm_cpudetect_c
===
RCS file: patches/patch-aom_ports_arm_cpudetect_c
diff -N patches/patch-aom_ports_arm_cpudetect_c
--- patches/patch-aom_ports_arm_cpudetect_c 29 May 2023 17:52:01 -  
1.6
+++ /dev/null   1 Jan 1970