Search code examples
macoscmakezephyr-rtos

arm-zephyr-eabi-g++: error: unrecognized command-line option '-arch'; did you mean '-march='?


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,

  1. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8.5-a")
  2. set(CMAKE_SYSTEM_PROCESSOR ARM)

in project top level CMakeLists.txt and no changes.

Any idea on how we can address this?


Solution

  • Applying this patch resolved this.