Skip to content

Commit

Permalink
arm64/toolchain: Cmake alignment makefile writing
Browse files Browse the repository at this point in the history
They should be a relationship of choice:
ifeq ($(CONFIG_ARCH_CORTEX_A53),y)
  ARCHCPUFLAGS += -mcpu=cortex-a53
else ifeq ($(CONFIG_ARCH_CORTEX_A55),y)
  ARCHCPUFLAGS += -mcpu=cortex-a55
else ifeq ($(CONFIG_ARCH_CORTEX_A57),y)
  ARCHCPUFLAGS += -mcpu=cortex-a57
else ifeq ($(CONFIG_ARCH_CORTEX_A72),y)
  ARCHCPUFLAGS += -mcpu=cortex-a72
else ifeq ($(CONFIG_ARCH_CORTEX_R82),y)
  ARCHCPUFLAGS += -mcpu=cortex-r82
else ifeq ($(CONFIG_ARCH_ARMV8A),y)
  ARCHCPUFLAGS += -march=armv8-a
else ifeq ($(CONFIG_ARCH_ARMV8R),y)
  ARCHCPUFLAGS += -march=armv8-r
endif

Signed-off-by: wangmingrong1 <[email protected]>
  • Loading branch information
W-M-R authored and xiaoxiang781216 committed Nov 29, 2024
1 parent 8257b11 commit 137ca05
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arch/arm64/src/cmake/Toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ set(NO_LTO "-fno-lto")

if(CONFIG_ARCH_ARMV8A)
add_compile_options(-march=armv8-a)
endif()

if(CONFIG_ARCH_ARMV8R)
elseif(CONFIG_ARCH_ARMV8R)
add_compile_options(-march=armv8-r)
endif()

if(CONFIG_ARCH_CORTEX_A53)
elseif(CONFIG_ARCH_CORTEX_A53)
add_compile_options(-mcpu=cortex-a53)
elseif(CONFIG_ARCH_CORTEX_A57)
add_compile_options(-mcpu=cortex-a57)
Expand Down

0 comments on commit 137ca05

Please sign in to comment.