From ee72304b25abc8ccfe8581b99f4c53a3c106700c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 31 Jul 2015 08:39:26 -0600 Subject: [PATCH] Newer 4.9 GCC does not permit both -mcpu= and -march= on the command line; either -mcpu= or -march= with -mtune. The latter gives me linking errors so all of the arguments committed to the former. Untested on more tools --- arch/arm/src/armv6-m/Toolchain.defs | 16 ++++++++-------- arch/arm/src/armv7-m/Toolchain.defs | 18 +++++++++--------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/arch/arm/src/armv6-m/Toolchain.defs b/arch/arm/src/armv6-m/Toolchain.defs index d134d2e1a0..bb9fc54e9f 100644 --- a/arch/arm/src/armv6-m/Toolchain.defs +++ b/arch/arm/src/armv6-m/Toolchain.defs @@ -108,7 +108,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),ATOLLIC) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # NuttX buildroot under Linux or Cygwin @@ -124,7 +124,7 @@ endif ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODEREDL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # Code Red RedSuite under Windows @@ -135,7 +135,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODEREDW) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # CodeSourcery under Linux @@ -143,7 +143,7 @@ endif ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODESOURCERYL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # CodeSourcery under Windows @@ -154,7 +154,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODESOURCERYW) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # devkitARM under Windows @@ -165,7 +165,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),DEVKITARM) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # Generic GNU EABI toolchain on OS X, Linux or any typical Posix system @@ -173,7 +173,7 @@ endif ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABIL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABIW) @@ -182,7 +182,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABIW) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif - ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -march=armv6-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif # Individual tools may limit the optimizatin level but, by default, the diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/src/armv7-m/Toolchain.defs index 6fccae1e18..e673cd7ab0 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/src/armv7-m/Toolchain.defs @@ -164,7 +164,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),ATOLLIC) CROSSDEV ?= arm-atollic-eabi- ARCROSSDEV ?= arm-atollic-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif @@ -176,11 +176,11 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),BUILDROOT) ifeq ($(CONFIG_ARMV7M_OABI_TOOLCHAIN),y) CROSSDEV ?= arm-nuttx-elf- ARCROSSDEV ?= arm-nuttx-elf- - ARCHCPUFLAGS = $(TOOLCHAIN_MTUNE) $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) $(TOOLCHAIN_MFLOAT) else CROSSDEV ?= arm-nuttx-eabi- ARCROSSDEV ?= arm-nuttx-eabi- - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif MAXOPTIMIZATION ?= -Os endif @@ -191,7 +191,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif # Code Red RedSuite under Windows @@ -200,7 +200,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDW) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif @@ -212,7 +212,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -O2 - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif # CodeSourcery under Windows @@ -221,7 +221,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYW) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif @@ -244,7 +244,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABIL) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif # Generic GNU EABI toolchain under Windows @@ -253,7 +253,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABIW) CROSSDEV ?= arm-none-eabi- ARCROSSDEV ?= arm-none-eabi- MAXOPTIMIZATION ?= -Os - ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MARCH) $(TOOLCHAIN_MFLOAT) + ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifneq ($(CONFIG_WINDOWS_NATIVE),y) WINTOOL = y endif