Skip to content

Commit

Permalink
arch: arm: Remove extraneous root cmake files
Browse files Browse the repository at this point in the history
The ARM architecture root directory contains `aarch32.cmake` and
`aarch64.cmake` files whose contents are better suited to go into other
more purpose-specific files.

This commit removes the aforementioned files and moves their contents
to other files following the convention used by other architectures.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
  • Loading branch information
stephanosio authored and avisconti committed Apr 15, 2020
1 parent c3a889f commit c6a5b1e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 36 deletions.
8 changes: 6 additions & 2 deletions arch/arm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# SPDX-License-Identifier: Apache-2.0

if(CONFIG_ARM64)
include(aarch64.cmake)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf64-littleaarch64)

add_subdirectory(core/aarch64)
else()
include(aarch32.cmake)
set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT elf32-littlearm)

add_subdirectory(core/aarch32)
endif()
29 changes: 0 additions & 29 deletions arch/arm/aarch32.cmake

This file was deleted.

5 changes: 0 additions & 5 deletions arch/arm/aarch64.cmake

This file was deleted.

17 changes: 17 additions & 0 deletions cmake/compiler/gcc/target_arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ else()
list(APPEND TOOLCHAIN_LD_FLAGS -mthumb)
endif()

set(ARCH_FOR_cortex-m0 armv6s-m )
set(ARCH_FOR_cortex-m0plus armv6s-m )
set(ARCH_FOR_cortex-m3 armv7-m )
set(ARCH_FOR_cortex-m4 armv7e-m )
set(ARCH_FOR_cortex-m23 armv8-m.base )
set(ARCH_FOR_cortex-m33 armv8-m.main+dsp)
set(ARCH_FOR_cortex-m33+nodsp armv8-m.main )
set(ARCH_FOR_cortex-r4 armv7-r )
set(ARCH_FOR_cortex-r5 armv7-r+idiv )

if(ARCH_FOR_${GCC_M_CPU})
set(ARCH_FLAG -march=${ARCH_FOR_${GCC_M_CPU}})
endif()

list(APPEND TOOLCHAIN_C_FLAGS -mabi=aapcs ${ARCH_FLAG})
list(APPEND TOOLCHAIN_LD_FLAGS -mabi=aapcs ${ARCH_FLAG})

# Defines a mapping from GCC_M_CPU to FPU

if(CONFIG_CPU_HAS_FPU_DOUBLE_PRECISION)
Expand Down

0 comments on commit c6a5b1e

Please sign in to comment.