diff --git a/arch/arm/src/armv6-m/Toolchain.defs b/arch/arm/src/armv6-m/Toolchain.defs index 2a105f9168..bd88911bf4 100644 --- a/arch/arm/src/armv6-m/Toolchain.defs +++ b/arch/arm/src/armv6-m/Toolchain.defs @@ -30,7 +30,7 @@ LLVM_CPUTYPE := cortex-m0 # Clang Configuration files ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) - TOOLCHAIN_CLANG_CONFIG = --config armv6m_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv6m_soft_nofp else ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) LDFLAGS += --cpu=Cortex-M0 endif diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/src/armv7-m/Toolchain.defs index bee4b56803..86c7a666a3 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/src/armv7-m/Toolchain.defs @@ -72,18 +72,18 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) ifeq ($(CONFIG_ARCH_CORTEXM4),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv7em_hard_fpv4_sp_d16 + TOOLCHAIN_CLANG_CONFIG = armv7em_hard_fpv4_sp_d16 else - TOOLCHAIN_CLANG_CONFIG = --config armv7em_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv7em_soft_nofp endif else ifeq ($(CONFIG_ARCH_CORTEXM7),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv7em_hard_fpv5_d16 + TOOLCHAIN_CLANG_CONFIG = armv7em_hard_fpv5_d16 else - TOOLCHAIN_CLANG_CONFIG = --config armv7em_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv7em_soft_nofp endif else # ifeq ($(CONFIG_ARCH_CORTEXM3),y) - TOOLCHAIN_CLANG_CONFIG = --config armv7m_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv7m_soft_nofp endif else ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),y) diff --git a/arch/arm/src/armv8-m/Toolchain.defs b/arch/arm/src/armv8-m/Toolchain.defs index 79bc8c6985..04036b021f 100644 --- a/arch/arm/src/armv8-m/Toolchain.defs +++ b/arch/arm/src/armv8-m/Toolchain.defs @@ -109,30 +109,30 @@ endif ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) ifeq ($(CONFIG_ARCH_CORTEXM23),y) - TOOLCHAIN_CLANG_CONFIG = --config armv8m.main_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp else ifeq ($(CONFIG_ARCH_CORTEXM33),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv8m.main_hard_fp + TOOLCHAIN_CLANG_CONFIG = armv8m.main_hard_fp else - TOOLCHAIN_CLANG_CONFIG = --config armv8m.main_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp endif else ifeq ($(CONFIG_ARCH_CORTEXM35P),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv8m.main_hard_fp + TOOLCHAIN_CLANG_CONFIG = armv8m.main_hard_fp else - TOOLCHAIN_CLANG_CONFIG = --config armv8m.main_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv8m.main_soft_nofp endif else ifeq ($(CONFIG_ARCH_CORTEXM55),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv8.1m.main_hard_fp + TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_hard_fp else - TOOLCHAIN_CLANG_CONFIG = --config armv8.1m.main_soft_nofp_nomve + TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_soft_nofp_nomve endif else ifeq ($(CONFIG_ARCH_CORTEXM85),y) ifeq ($(CONFIG_ARCH_FPU),y) - TOOLCHAIN_CLANG_CONFIG = --config armv8.1m.main_hard_fp + TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_hard_fp else - TOOLCHAIN_CLANG_CONFIG = --config armv8.1m.main_soft_nofp_nomve + TOOLCHAIN_CLANG_CONFIG = armv8.1m.main_soft_nofp_nomve endif endif diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index e72d678f58..991ce31b81 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -185,7 +185,14 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) TOOLCHAIN_CLANG_CONFIG := $(TOOLCHAIN_CLANG_CONFIG)_nosys endif - ARCHCPUFLAGS += $(TOOLCHAIN_CLANG_CONFIG).cfg + ifeq ($(CLANGVER),17.0) + TOOLCHAIN_CLANG_OPTION = -target + ARCHCPUFLAGS += --target=arm-none-eabi + else + TOOLCHAIN_CLANG_OPTION = --config + endif + + ARCHCPUFLAGS := $(TOOLCHAIN_CLANG_OPTION) $(TOOLCHAIN_CLANG_CONFIG).cfg $(ARCHCPUFLAGS) endif # ARM Compiler Clang toolchain diff --git a/arch/arm/src/tlsr82/Toolchain.defs b/arch/arm/src/tlsr82/Toolchain.defs index 50f730f00f..7e665770db 100644 --- a/arch/arm/src/tlsr82/Toolchain.defs +++ b/arch/arm/src/tlsr82/Toolchain.defs @@ -21,7 +21,7 @@ # Clang Configuration files ifeq ($(CONFIG_ARM_TOOLCHAIN_CLANG),y) - TOOLCHAIN_CLANG_CONFIG = --config armv6m_soft_nofp + TOOLCHAIN_CLANG_CONFIG = armv6m_soft_nofp endif # Generic GNU EABI toolchain