Submitted by:            Zeckma (zeckma dot tech at gmail dot com)
Date:                    2025-10-27
Initial Package Version: 3.13.1
Upstream Status:         Applied
Origin:                  Upstream Git repository
                         (https://aomedia.googlesource.com/aom/+/6d2b7f71b98bfa28e372b1f2d85f137280bdb3de%5E%21/)
Description:             Fixes configuration with NASM-3 (3.00-3.01).
diff --git a/build/cmake/aom_optimization.cmake b/build/cmake/aom_optimization.cmake
index 9cc34de..2750a0b 100644
--- a/build/cmake/aom_optimization.cmake
+++ b/build/cmake/aom_optimization.cmake

@@ -212,7 +212,7 @@
 # Currently checks only for presence of required object formats and support for
 # the -Ox argument (multipass optimization).
 function(test_nasm)
-  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hf
+  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hO
                   OUTPUT_VARIABLE nasm_helptext)
 
   if(NOT "${nasm_helptext}" MATCHES "-Ox")
@@ -220,6 +220,8 @@
       FATAL_ERROR "Unsupported nasm: multipass optimization not supported.")
   endif()
 
+  execute_process(COMMAND ${CMAKE_ASM_NASM_COMPILER} -hf
+                  OUTPUT_VARIABLE nasm_helptext)
   if("${AOM_TARGET_CPU}" STREQUAL "x86")
     if("${AOM_TARGET_SYSTEM}" STREQUAL "Darwin")
       if(NOT "${nasm_helptext}" MATCHES "macho32")
