arch: Uniformize optimization flag setting across architectures
This commit is contained in:
parent
abf039b744
commit
f8a36f10c3
@ -63,6 +63,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
@ -73,14 +75,12 @@ ifeq ($(CONFIG_ARM_OABI_TOOLCHAIN),y)
|
||||
else
|
||||
CROSSDEV ?= arm-nuttx-eabi-
|
||||
endif
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU EABI toolchain
|
||||
|
||||
ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI)
|
||||
CROSSDEV ?= arm-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
@ -57,6 +57,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
@ -73,11 +75,6 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABI)
|
||||
ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft
|
||||
endif
|
||||
|
||||
# Individual tools may limit the optimizatin level but, by default, the
|
||||
# optimization level will be set to -Os
|
||||
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
|
||||
# Default toolchain
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
@ -75,6 +75,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ENDIAN_BIG),y)
|
||||
@ -91,14 +93,12 @@ ifeq ($(CONFIG_ARMV7A_OABI_TOOLCHAIN),y)
|
||||
else
|
||||
CROSSDEV ?= $(TARGET_ARCH)-nuttx-eabi-
|
||||
endif
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU EABI toolchain
|
||||
|
||||
ifeq ($(CONFIG_ARMV7A_TOOLCHAIN),GNU_EABI)
|
||||
CROSSDEV ?= $(TARGET_ARCH)-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
@ -71,6 +71,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Parametrization for ARCHCPUFLAGS
|
||||
@ -117,14 +119,12 @@ else
|
||||
CROSSDEV ?= arm-nuttx-eabi-
|
||||
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||
endif
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU EABI toolchain
|
||||
|
||||
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABI)
|
||||
CROSSDEV ?= arm-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||
endif
|
||||
|
||||
@ -132,7 +132,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CLANG)
|
||||
CROSSDEV ?= arm-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
ARCHCPUFLAGS = -target arm-none-eabi $(TOOLCHAIN_MCPU) $(TOOLCHAIN_MFLOAT)
|
||||
CC = clang
|
||||
CXX = clang++
|
||||
|
@ -57,6 +57,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ENDIAN_BIG),y)
|
||||
@ -73,14 +75,12 @@ ifeq ($(CONFIG_ARMV7R_OABI_TOOLCHAIN),y)
|
||||
else
|
||||
CROSSDEV ?= $(TARGET_ARCH)-nuttx-eabi-
|
||||
endif
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU EABI toolchain
|
||||
|
||||
ifeq ($(CONFIG_ARMV7R_TOOLCHAIN),GNU_EABI)
|
||||
CROSSDEV ?= $(TARGET_ARCH)-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
@ -71,6 +71,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Parametrization for ARCHCPUFLAGS
|
||||
@ -107,14 +109,12 @@ else
|
||||
CROSSDEV ?= arm-nuttx-eabi-
|
||||
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||
endif
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU EABI toolchain
|
||||
|
||||
ifeq ($(CONFIG_ARMV8M_TOOLCHAIN),GNU_EABI)
|
||||
CROSSDEV ?= arm-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||
endif
|
||||
|
||||
@ -122,7 +122,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_ARMV8M_TOOLCHAIN),CLANG)
|
||||
CROSSDEV ?= arm-none-eabi-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT)
|
||||
endif
|
||||
|
||||
|
@ -86,13 +86,14 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
endif
|
||||
|
||||
# NuttX buildroot GCC toolchain under Linux or Cygwin
|
||||
|
||||
ifeq ($(CONFIG_AVR_TOOLCHAIN),BUILDROOT)
|
||||
CROSSDEV ?= avr-nuttx-elf-
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
||||
@ -100,7 +101,6 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_AVR_TOOLCHAIN),CROSSPACK)
|
||||
CROSSDEV ?= avr-
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
||||
@ -108,13 +108,11 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_AVR_TOOLCHAIN),LINUXGCC)
|
||||
CROSSDEV ?= avr-
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AVR_TOOLCHAIN),WINAVR)
|
||||
CROSSDEV ?= avr-
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
endif
|
||||
|
||||
|
@ -57,20 +57,20 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# NuttX buildroot under Linux or Cygwin
|
||||
|
||||
ifeq ($(CONFIG_LM32_TOOLCHAIN),BUILDROOT)
|
||||
CROSSDEV ?= lm32-nuttx-elf-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU toolchain
|
||||
|
||||
ifeq ($(CONFIG_LM32_TOOLCHAIN),GNUL)
|
||||
CROSSDEV ?= lm32-elf-
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
@ -21,8 +21,10 @@
|
||||
CROSSDEV = riscv32-unknown-elf-
|
||||
ARCHCPUFLAGS = -march=rv32i
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),)
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
@ -49,6 +49,8 @@
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
endif
|
||||
|
||||
# Pick correct or1k architecture selection
|
||||
@ -61,7 +63,6 @@ endif
|
||||
|
||||
#ifeq ($(CONFIG_OR1K_TOOLCHAIN),GNU_ELF)
|
||||
CROSSDEV ?= or1k-elf-
|
||||
MAXOPTIMIZATION ?= -O2
|
||||
ARCHCPUFLAGS = -mboard=de0_nano
|
||||
ARCHPICFLAGS = -fpic -membedded-pic
|
||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||
|
@ -49,6 +49,8 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Generic GNU RVG toolchain
|
||||
@ -57,13 +59,6 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
|
||||
CROSSDEV ?= riscv64-unknown-elf-
|
||||
endif
|
||||
|
||||
# Individual tools may limit the optimization level but, by default, the
|
||||
# optimization level will be set to -Os
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),)
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
||||
CC = $(CROSSDEV)gcc
|
||||
|
@ -36,7 +36,7 @@ ARCHCPUFLAGS =
|
||||
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
|
||||
MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
|
||||
else
|
||||
MAXOPTIMIZATION := -Os
|
||||
MAXOPTIMIZATION ?= -Os
|
||||
endif
|
||||
|
||||
# Default toolchain
|
||||
|
Loading…
Reference in New Issue
Block a user