When we tried to build a Zephyr project in Mac Mini M2, we're getting this issue.
arm-zephyr-eabi-g++: error: unrecognized command-line option '-arch'; did you mean '-march='?
Tried setting,
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8.5-a")
set(CMAKE_SYSTEM_PROCESSOR ARM)
in project top level CMakeLists.txt and no changes.
Any idea on how we can address this?
Applying this patch resolved this.