diff --git a/arch/arm/src/arm/Toolchain.defs b/arch/arm/src/arm/Toolchain.defs index 1884947359..5dffaefc2c 100644 --- a/arch/arm/src/arm/Toolchain.defs +++ b/arch/arm/src/arm/Toolchain.defs @@ -51,20 +51,24 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_MM_KASAN),y) @@ -101,8 +105,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -112,8 +116,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Default toolchain @@ -131,14 +135,14 @@ NM = $(CROSSDEV)nm # Link Time Optimization ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABI) LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fuse-linker-plugin - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif diff --git a/arch/arm/src/armv6-m/Toolchain.defs b/arch/arm/src/armv6-m/Toolchain.defs index 7a7caabaa6..800026062c 100644 --- a/arch/arm/src/armv6-m/Toolchain.defs +++ b/arch/arm/src/armv6-m/Toolchain.defs @@ -51,22 +51,28 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CLANG) - MAXOPTIMIZATION ?= -Oz -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CLANG) + ARCHOPTIMIZATION += -Oz + else + ARCHOPTIMIZATION += -Os + endif +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif # Parametrization for ARCHCPUFLAGS @@ -83,12 +89,9 @@ endif # Link Time Optimization ifeq ($(CONFIG_LTO_THIN),y) - MAXOPTIMIZATION += -flto=thin + ARCHOPTIMIZATION += -flto=thin else ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto - ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABI) - MAXOPTIMIZATION += -fuse-linker-plugin - endif + ARCHOPTIMIZATION += -flto endif # NuttX buildroot under Linux or Cygwin @@ -124,7 +127,7 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CLANG) # disable the built-in functions, refer: # https://github.com/apache/incubator-nuttx/pull/5971 - MAXOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -fno-builtin # Default toolchain @@ -132,22 +135,12 @@ else CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E -P -x c - STRIP = $(CROSSDEV)strip --strip-unneeded - OBJCOPY = $(CROSSDEV)objcopy - OBJDUMP = $(CROSSDEV)objdump LD = $(CROSSDEV)ld + STRIP = $(CROSSDEV)strip --strip-unneeded AR = $(CROSSDEV)ar rcs NM = $(CROSSDEV)nm - - ifeq ($(CONFIG_LTO_FULL),y) - ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABI) - LD := $(CROSSDEV)gcc - AR := $(CROSSDEV)gcc-ar rcs - NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs - endif - endif + OBJCOPY = $(CROSSDEV)objcopy + OBJDUMP = $(CROSSDEV)objdump endif # Architecture flags @@ -170,8 +163,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -181,8 +174,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Add the builtin library diff --git a/arch/arm/src/armv7-a/Toolchain.defs b/arch/arm/src/armv7-a/Toolchain.defs index 5837c04920..87ca00b810 100644 --- a/arch/arm/src/armv7-a/Toolchain.defs +++ b/arch/arm/src/armv7-a/Toolchain.defs @@ -45,7 +45,7 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # @@ -101,15 +101,19 @@ ifeq ($(CONFIG_MM_KASAN),y) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_ENDIAN_BIG),y) @@ -132,8 +136,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -143,8 +147,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # NuttX buildroot under Linux or Cygwin @@ -178,14 +182,14 @@ NM = $(CROSSDEV)nm # Link Time Optimization ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARMV7A_TOOLCHAIN),GNU_EABI) LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fuse-linker-plugin - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/src/armv7-m/Toolchain.defs index 96c27fa79b..d80ed4f74e 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/src/armv7-m/Toolchain.defs @@ -53,22 +53,28 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CLANG) - MAXOPTIMIZATION ?= -Oz -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CLANG) + ARCHOPTIMIZATION += -Oz + else + ARCHOPTIMIZATION += -Os + endif +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif # Parametrization for ARCHCPUFLAGS @@ -133,11 +139,11 @@ endif # Link Time Optimization ifeq ($(CONFIG_LTO_THIN),y) - MAXOPTIMIZATION += -flto=thin + ARCHOPTIMIZATION += -flto=thin else ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABI) - MAXOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fuse-linker-plugin endif endif @@ -183,7 +189,7 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CLANG) # disable the built-in functions, refer: # https://github.com/apache/incubator-nuttx/pull/5971 - MAXOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -fno-builtin # Default toolchain @@ -203,8 +209,8 @@ else LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif endif @@ -225,8 +231,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -236,8 +242,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Add the builtin library diff --git a/arch/arm/src/armv7-r/Toolchain.defs b/arch/arm/src/armv7-r/Toolchain.defs index e42d8ff0cc..05289d6b95 100644 --- a/arch/arm/src/armv7-r/Toolchain.defs +++ b/arch/arm/src/armv7-r/Toolchain.defs @@ -45,20 +45,24 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_ARCH_CORTEXR4),y) @@ -124,8 +128,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -135,8 +139,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Default toolchain @@ -154,14 +158,14 @@ NM = $(CROSSDEV)nm # Link Time Optimization ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARMV7R_TOOLCHAIN),GNU_EABI) LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fuse-linker-plugin - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif diff --git a/arch/arm/src/armv8-m/Toolchain.defs b/arch/arm/src/armv8-m/Toolchain.defs index 32ecf4de9b..94ef2823a5 100644 --- a/arch/arm/src/armv8-m/Toolchain.defs +++ b/arch/arm/src/armv8-m/Toolchain.defs @@ -53,22 +53,28 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else ifeq ($(CONFIG_ARMV8M_TOOLCHAIN),CLANG) - MAXOPTIMIZATION ?= -Oz -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CLANG) + ARCHOPTIMIZATION += -Oz + else + ARCHOPTIMIZATION += -Os + endif +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif # Parametrization for ARCHCPUFLAGS @@ -142,11 +148,11 @@ endif # Link Time Optimization ifeq ($(CONFIG_LTO_THIN),y) - MAXOPTIMIZATION += -flto=thin + ARCHOPTIMIZATION += -flto=thin else ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_ARMV8M_TOOLCHAIN),GNU_EABI) - MAXOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fuse-linker-plugin endif endif @@ -192,7 +198,7 @@ ifeq ($(CONFIG_ARMV8M_TOOLCHAIN),CLANG) # disable the built-in functions, refer: # https://github.com/apache/incubator-nuttx/pull/5971 - MAXOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -fno-builtin # Default toolchain @@ -212,8 +218,8 @@ else LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif endif @@ -234,8 +240,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -245,8 +251,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Add the builtin library diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index d5bff2a09e..eecf86ca79 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -83,9 +83,19 @@ else ifeq ($(CONFIG_ARCH_CHIP_ATMEGA2560),y) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION ?= -O2 + ARCHOPTIMIZATION += -fomit-frame-pointer endif ARCHCFLAGS += -fno-common diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index ba91d7f8ca..789ba07d27 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -31,9 +31,19 @@ # GNU, not AVRTOOLSW. # +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls +else + ARCHOPTIMIZATION += -fomit-frame-pointer endif ARCHCFLAGS += -fno-common diff --git a/arch/ceva/src/xc5/Toolchain.defs b/arch/ceva/src/xc5/Toolchain.defs index 099d9d9171..f140e7115f 100644 --- a/arch/ceva/src/xc5/Toolchain.defs +++ b/arch/ceva/src/xc5/Toolchain.defs @@ -33,7 +33,7 @@ DTCM_KB := $(shell expr $(CONFIG_ARCH_DTCM_SIZE) / 1024) # invoking ar and nm. # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # @@ -45,14 +45,24 @@ ifneq ($(CROSSDEV),) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) else ifeq ($(CONFIG_DEBUG_FULLOPT),y) - MAXOPTIMIZATION := -O3 -Os3 + ARCHOPTIMIZATION += -O3 -Os3 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls +else + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/ceva/src/xm6/Toolchain.defs b/arch/ceva/src/xm6/Toolchain.defs index b9d4778513..ccae8442c5 100644 --- a/arch/ceva/src/xm6/Toolchain.defs +++ b/arch/ceva/src/xm6/Toolchain.defs @@ -33,7 +33,7 @@ DTCM_KB := $(shell expr $(CONFIG_ARCH_DTCM_SIZE) / 1024) # invoking ar and nm. # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # @@ -45,14 +45,24 @@ ifneq ($(CROSSDEV),) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) else ifeq ($(CONFIG_DEBUG_FULLOPT),y) - MAXOPTIMIZATION := -O3 -Os3 + ARCHOPTIMIZATION += -O3 -Os3 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls +else + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/mips/src/mips32/Toolchain.defs b/arch/mips/src/mips32/Toolchain.defs index b367386919..27365dfb08 100644 --- a/arch/mips/src/mips32/Toolchain.defs +++ b/arch/mips/src/mips32/Toolchain.defs @@ -101,12 +101,18 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif # Pick correct MIPS architecture selection @@ -137,7 +143,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),GNU_ELF) CROSSDEV ?= mips-elf- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=$(MIPS_MARCH) $(MIPS_MICROMIPS) -EL ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -148,7 +153,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOL) CROSSDEV ?= p32- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=$(MIPS_MARCH) $(MIPS_MICROMIPS) -EL ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -159,7 +163,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),SOURCERY_CODEBENCH_LITE) CROSSDEV ?= mips-sde-elf- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=$(MIPS_MARCH) $(MIPS_MICROMIPS) -EL ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -170,9 +173,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL_XC32) CROSSDEV ?= xc32- -ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIP_XC32_LICENSED),y) - MAXOPTIMIZATION ?= -O2 -endif ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) -march=$(MIPS_MARCH) -EL $(MIPS_MICROMIPS) -msmart-io=0 LDFLAGS += -nostartfiles -nodefaultlibs LDSCRIPT = xc32-debug.ld @@ -182,8 +182,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL) CROSSDEV ?= pic32- - # CROSSDEV ?= xc32- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -194,9 +192,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_XC32) CROSSDEV ?= xc32- -ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIP_XC32_LICENSED),y) - MAXOPTIMIZATION ?= -O2 -endif ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) -march=$(MIPS_MARCH) -EL $(MIPS_MICROMIPS) -msmart-io=0 LDFLAGS += -nostartfiles -nodefaultlibs LDSCRIPT = xc32-debug.ld @@ -206,7 +201,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW) CROSSDEV ?= pic32- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -217,7 +211,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPL_LITE) CROSSDEV ?= pic32- - # MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -228,8 +221,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_LITE) CROSSDEV ?= pic32- - # CROSSDEV ?= xc32- - # MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -240,7 +231,6 @@ endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPOPENL) CROSSDEV ?= mypic32- - # MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -250,9 +240,7 @@ endif # Pinguino mips-elf toolchain under Windows ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW) - #CROSSDEV ?= mips- CROSSDEV ?= p32- - MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=$(MIPS_MARCH) $(MIPS_MICROMIPS) -EL ARCHPICFLAGS = -fpic -membedded-pic LDFLAGS += -nostartfiles -nodefaultlibs @@ -260,16 +248,16 @@ ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW) endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -279,8 +267,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/misoc/src/lm32/Toolchain.defs b/arch/misoc/src/lm32/Toolchain.defs index ec8e8f8cee..c24a671541 100644 --- a/arch/misoc/src/lm32/Toolchain.defs +++ b/arch/misoc/src/lm32/Toolchain.defs @@ -45,19 +45,29 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/misoc/src/minerva/Toolchain.defs b/arch/misoc/src/minerva/Toolchain.defs index c5b91c7201..d5e4ed88d4 100644 --- a/arch/misoc/src/minerva/Toolchain.defs +++ b/arch/misoc/src/minerva/Toolchain.defs @@ -22,14 +22,24 @@ CROSSDEV = riscv32-unknown-elf- ARCHCPUFLAGS = -march=rv32i ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/or1k/src/mor1kx/Toolchain.defs b/arch/or1k/src/mor1kx/Toolchain.defs index 403a82da92..28906ef663 100644 --- a/arch/or1k/src/mor1kx/Toolchain.defs +++ b/arch/or1k/src/mor1kx/Toolchain.defs @@ -28,19 +28,29 @@ # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing +endif + +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION ?= -O2 + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs index d2e1503c9b..8930469173 100644 --- a/arch/risc-v/src/common/Toolchain.defs +++ b/arch/risc-v/src/common/Toolchain.defs @@ -39,20 +39,24 @@ endif # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ARCHCFLAGS += -fno-common @@ -69,8 +73,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -80,8 +84,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Generic GNU RVG toolchain @@ -159,14 +163,14 @@ NM = $(CROSSDEV)nm # Link Time Optimization ifeq ($(CONFIG_LTO_FULL),y) - MAXOPTIMIZATION += -flto + ARCHOPTIMIZATION += -flto ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG) LD := $(CROSSDEV)gcc AR := $(CROSSDEV)gcc-ar rcs NM := $(CROSSDEV)gcc-nm - MAXOPTIMIZATION += -fuse-linker-plugin - MAXOPTIMIZATION += -fno-builtin - MAXOPTIMIZATION += -nodefaultlibs + ARCHOPTIMIZATION += -fuse-linker-plugin + ARCHOPTIMIZATION += -fno-builtin + ARCHOPTIMIZATION += -nodefaultlibs endif endif diff --git a/arch/sparc/src/sparc_v8/Toolchain.defs b/arch/sparc/src/sparc_v8/Toolchain.defs index 96c02e1d68..67a04686a0 100644 --- a/arch/sparc/src/sparc_v8/Toolchain.defs +++ b/arch/sparc/src/sparc_v8/Toolchain.defs @@ -55,18 +55,24 @@ else ifeq ($(CONFIG_ARCH_CHIP_BM3823),y) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g - MAXOPTIMIZATION += -g + ARCHOPTIMIZATION += -g endif ARCHCFLAGS += -fno-common @@ -84,7 +90,6 @@ endif ifeq ($(CONFIG_SPARC_TOOLCHAIN),BUILDROOT) CROSSDEV ?= sparc-gaisler-elf- - MAXOPTIMIZATION ?= -O2 LDFLAGS += -nostartfiles -nodefaultlibs LDSCRIPT = sparc-gaisler-elf-debug.ld endif @@ -93,7 +98,6 @@ endif ifeq ($(CONFIG_SPARC_TOOLCHAIN),CODEREDW) CROSSDEV ?= sparc-elf- - MAXOPTIMIZATION ?= -O2 LDFLAGS += -nostartfiles -nodefaultlibs LDSCRIPT = sparc-elf-debug.ld endif diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index a852f70dce..3f72c925df 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -25,7 +25,7 @@ # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # @@ -48,15 +48,19 @@ ifeq ($(CONFIG_MM_KASAN),y) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ARCHCFLAGS += -fno-common @@ -73,8 +77,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -84,8 +88,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Default toolchain diff --git a/arch/xtensa/src/lx7/Toolchain.defs b/arch/xtensa/src/lx7/Toolchain.defs index cd1f3b7e84..0483c8073b 100644 --- a/arch/xtensa/src/lx7/Toolchain.defs +++ b/arch/xtensa/src/lx7/Toolchain.defs @@ -25,7 +25,7 @@ # CROSSDEV The GNU toolchain triple (command prefix) # ARCHCPUFLAGS CPU-specific flags selecting the instruction set # FPU options, etc. -# MAXOPTIMIZATION The maximum optimization level that results in +# ARCHOPTIMIZATION The optimization level that results in # reliable code generation. # @@ -48,15 +48,19 @@ ifeq ($(CONFIG_MM_KASAN),y) endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION := -Os + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -Os +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -fno-strict-aliasing endif ifeq ($(CONFIG_FRAME_POINTER),y) - MAXOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls else - MAXOPTIMIZATION += -fomit-frame-pointer + ARCHOPTIMIZATION += -fomit-frame-pointer endif ARCHCFLAGS += -fno-common @@ -73,8 +77,8 @@ endif # Optimization of unused sections ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map @@ -84,8 +88,8 @@ ifeq ($(CONFIG_DEBUG_LINK_MAP),y) endif ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - LDFLAGS += -g - MAXOPTIMIZATION += -g + LDFLAGS += -g + ARCHOPTIMIZATION += -g endif # Default toolchain diff --git a/arch/z80/src/ez80/Toolchain.defs b/arch/z80/src/ez80/Toolchain.defs index decbdea53b..27b189b78c 100644 --- a/arch/z80/src/ez80/Toolchain.defs +++ b/arch/z80/src/ez80/Toolchain.defs @@ -43,7 +43,7 @@ else endif ifeq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += -O0 + ARCHOPTIMIZATION += -O0 -fno-strict-aliasing else ARCHOPTIMIZATION += -Oz endif @@ -66,9 +66,15 @@ ARCHASMWARNINGS = -W # Optimization of unused sections +ifeq ($(CONFIG_FRAME_POINTER),y) + ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls +else + ARCHOPTIMIZATION += -fomit-frame-pointer +endif + ifeq ($(CONFIG_DEBUG_OPT_UNUSED_SECTIONS),y) - LDFLAGS += --gc-sections - MAXOPTIMIZATION += -ffunction-sections -fdata-sections + LDFLAGS += --gc-sections + ARCHOPTIMIZATION += -ffunction-sections -fdata-sections endif # Debug link map diff --git a/boards/arm/a1x/pcduino-a10/scripts/Make.defs b/boards/arm/a1x/pcduino-a10/scripts/Make.defs index 4e3d926594..39171e98de 100644 --- a/boards/arm/a1x/pcduino-a10/scripts/Make.defs +++ b/boards/arm/a1x/pcduino-a10/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-a/Toolchain.defs LDSCRIPT = sdram.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/am335x/beaglebone-black/scripts/Make.defs b/boards/arm/am335x/beaglebone-black/scripts/Make.defs index 7a42b06398..fa6035458f 100644 --- a/boards/arm/am335x/beaglebone-black/scripts/Make.defs +++ b/boards/arm/am335x/beaglebone-black/scripts/Make.defs @@ -25,13 +25,8 @@ include $(TOPDIR)/arch/arm/src/armv7-a/Toolchain.defs # Setup for the kind of memory that we are executing from LDSCRIPT = sdram.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/c5471/c5471evm/scripts/Make.defs b/boards/arm/c5471/c5471evm/scripts/Make.defs index 4dd4692f41..8a8a03b4e3 100644 --- a/boards/arm/c5471/c5471evm/scripts/Make.defs +++ b/boards/arm/c5471/c5471evm/scripts/Make.defs @@ -45,10 +45,6 @@ ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else diff --git a/boards/arm/cxd56xx/spresense/scripts/Make.defs b/boards/arm/cxd56xx/spresense/scripts/Make.defs index 6850d1dfa9..7552f26aaa 100644 --- a/boards/arm/cxd56xx/spresense/scripts/Make.defs +++ b/boards/arm/cxd56xx/spresense/scripts/Make.defs @@ -36,10 +36,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -mabi=aapcs ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/arm/dm320/ntosd-dm320/scripts/Make.defs b/boards/arm/dm320/ntosd-dm320/scripts/Make.defs index 6c91b6de60..cf58b89aa0 100644 --- a/boards/arm/dm320/ntosd-dm320/scripts/Make.defs +++ b/boards/arm/dm320/ntosd-dm320/scripts/Make.defs @@ -38,10 +38,6 @@ else OLDGCC = n endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft else diff --git a/boards/arm/efm32/efm32-g8xx-stk/scripts/Make.defs b/boards/arm/efm32/efm32-g8xx-stk/scripts/Make.defs index e4c7ea3968..4f0d91a70c 100644 --- a/boards/arm/efm32/efm32-g8xx-stk/scripts/Make.defs +++ b/boards/arm/efm32/efm32-g8xx-stk/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs include $(TOPDIR)/tools/Config.mk LDSCRIPT = efm32-g8xx-stk.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/efm32/efm32gg-stk3700/scripts/Make.defs b/boards/arm/efm32/efm32gg-stk3700/scripts/Make.defs index 32b9c014c8..0e3bf3571a 100644 --- a/boards/arm/efm32/efm32gg-stk3700/scripts/Make.defs +++ b/boards/arm/efm32/efm32gg-stk3700/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs include $(TOPDIR)/tools/Config.mk LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/efm32/olimex-efm32g880f128-stk/scripts/Make.defs b/boards/arm/efm32/olimex-efm32g880f128-stk/scripts/Make.defs index e4aee89770..dc0661d5d9 100644 --- a/boards/arm/efm32/olimex-efm32g880f128-stk/scripts/Make.defs +++ b/boards/arm/efm32/olimex-efm32g880f128-stk/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs include $(TOPDIR)/tools/Config.mk LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/eoss3/quickfeather/scripts/Make.defs b/boards/arm/eoss3/quickfeather/scripts/Make.defs index 8e34b32e82..c906029873 100644 --- a/boards/arm/eoss3/quickfeather/scripts/Make.defs +++ b/boards/arm/eoss3/quickfeather/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imx6/sabre-6quad/scripts/Make.defs b/boards/arm/imx6/sabre-6quad/scripts/Make.defs index b44c5d77dd..c325d1aa92 100644 --- a/boards/arm/imx6/sabre-6quad/scripts/Make.defs +++ b/boards/arm/imx6/sabre-6quad/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-a/Toolchain.defs LDSCRIPT = dramboot.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1020-evk/scripts/Make.defs b/boards/arm/imxrt/imxrt1020-evk/scripts/Make.defs index 41c083c5e4..7cd2ea39ca 100644 --- a/boards/arm/imxrt/imxrt1020-evk/scripts/Make.defs +++ b/boards/arm/imxrt/imxrt1020-evk/scripts/Make.defs @@ -30,11 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/Make.defs b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/Make.defs index c004e705b0..551315dbd0 100644 --- a/boards/arm/imxrt/imxrt1050-evk/configs/knsh/Make.defs +++ b/boards/arm/imxrt/imxrt1050-evk/configs/knsh/Make.defs @@ -28,11 +28,7 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1050-evk/scripts/Make.defs b/boards/arm/imxrt/imxrt1050-evk/scripts/Make.defs index 4b5bbe8a3e..f0afe34c3b 100644 --- a/boards/arm/imxrt/imxrt1050-evk/scripts/Make.defs +++ b/boards/arm/imxrt/imxrt1050-evk/scripts/Make.defs @@ -30,12 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/Make.defs b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/Make.defs index 7ffd03cf79..90da12df51 100644 --- a/boards/arm/imxrt/imxrt1060-evk/configs/knsh/Make.defs +++ b/boards/arm/imxrt/imxrt1060-evk/configs/knsh/Make.defs @@ -28,11 +28,7 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs b/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs index 8b56fe3eaf..68e2de4a99 100644 --- a/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs +++ b/boards/arm/imxrt/imxrt1060-evk/scripts/Make.defs @@ -30,12 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/Make.defs b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/Make.defs index 7ffd03cf79..90da12df51 100644 --- a/boards/arm/imxrt/imxrt1064-evk/configs/knsh/Make.defs +++ b/boards/arm/imxrt/imxrt1064-evk/configs/knsh/Make.defs @@ -28,11 +28,7 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/imxrt1064-evk/scripts/Make.defs b/boards/arm/imxrt/imxrt1064-evk/scripts/Make.defs index 4d2459a2be..94bf94dc68 100644 --- a/boards/arm/imxrt/imxrt1064-evk/scripts/Make.defs +++ b/boards/arm/imxrt/imxrt1064-evk/scripts/Make.defs @@ -30,12 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/imxrt/teensy-4.x/scripts/Make.defs b/boards/arm/imxrt/teensy-4.x/scripts/Make.defs index 86ca1c998c..819f50773b 100644 --- a/boards/arm/imxrt/teensy-4.x/scripts/Make.defs +++ b/boards/arm/imxrt/teensy-4.x/scripts/Make.defs @@ -30,24 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -STRIP = $(CROSSDEV)strip --strip-unneeded -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump - -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} - -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/freedom-k28f/scripts/Make.defs b/boards/arm/kinetis/freedom-k28f/scripts/Make.defs index aafd13e55d..655f6097e7 100644 --- a/boards/arm/kinetis/freedom-k28f/scripts/Make.defs +++ b/boards/arm/kinetis/freedom-k28f/scripts/Make.defs @@ -26,10 +26,6 @@ LDSCRIPT = flash.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/freedom-k64f/scripts/Make.defs b/boards/arm/kinetis/freedom-k64f/scripts/Make.defs index 07834f98df..89b1f13043 100644 --- a/boards/arm/kinetis/freedom-k64f/scripts/Make.defs +++ b/boards/arm/kinetis/freedom-k64f/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/freedom-k66f/scripts/Make.defs b/boards/arm/kinetis/freedom-k66f/scripts/Make.defs index a3d148f172..ccc886bb14 100644 --- a/boards/arm/kinetis/freedom-k66f/scripts/Make.defs +++ b/boards/arm/kinetis/freedom-k66f/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/kwikstik-k40/scripts/Make.defs b/boards/arm/kinetis/kwikstik-k40/scripts/Make.defs index 3405659fe2..4a7db1b48e 100644 --- a/boards/arm/kinetis/kwikstik-k40/scripts/Make.defs +++ b/boards/arm/kinetis/kwikstik-k40/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kwikstik-k40.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/teensy-3.x/scripts/Make.defs b/boards/arm/kinetis/teensy-3.x/scripts/Make.defs index 7cb4940073..788901f347 100644 --- a/boards/arm/kinetis/teensy-3.x/scripts/Make.defs +++ b/boards/arm/kinetis/teensy-3.x/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/twr-k60n512/scripts/Make.defs b/boards/arm/kinetis/twr-k60n512/scripts/Make.defs index 1a124a64b7..a60db24641 100644 --- a/boards/arm/kinetis/twr-k60n512/scripts/Make.defs +++ b/boards/arm/kinetis/twr-k60n512/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)twr-k60n512.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kinetis/twr-k64f120m/scripts/Make.defs b/boards/arm/kinetis/twr-k64f120m/scripts/Make.defs index 37a6942cab..1b9925887d 100644 --- a/boards/arm/kinetis/twr-k64f120m/scripts/Make.defs +++ b/boards/arm/kinetis/twr-k64f120m/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kl/freedom-kl25z/scripts/Make.defs b/boards/arm/kl/freedom-kl25z/scripts/Make.defs index f75c54405b..a546e80731 100644 --- a/boards/arm/kl/freedom-kl25z/scripts/Make.defs +++ b/boards/arm/kl/freedom-kl25z/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = freedom-kl25z.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kl/freedom-kl26z/scripts/Make.defs b/boards/arm/kl/freedom-kl26z/scripts/Make.defs index ae8d0fb35d..9ff6c714bc 100644 --- a/boards/arm/kl/freedom-kl26z/scripts/Make.defs +++ b/boards/arm/kl/freedom-kl26z/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = freedom-kl26z.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/kl/teensy-lc/scripts/Make.defs b/boards/arm/kl/teensy-lc/scripts/Make.defs index 27b4d24aa1..71643c518a 100644 --- a/boards/arm/kl/teensy-lc/scripts/Make.defs +++ b/boards/arm/kl/teensy-lc/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = teensy-lc.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs b/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs index 06aab144d3..0a75f5b286 100644 --- a/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs +++ b/boards/arm/lc823450/lc823450-xgevk/scripts/Make.defs @@ -24,20 +24,14 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ifeq ($(CONFIG_LC823450_IPL2),y) LDSCRIPT = ld-ipl2.script -else -ifeq ($(CONFIG_LC823450_SPIFI_BOOT),y) +else ifeq ($(CONFIG_LC823450_SPIFI_BOOT),y) LDSCRIPT = ld-spif-boot.script else LDSCRIPT = ld.script endif -endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lincoln60/scripts/Make.defs b/boards/arm/lpc17xx_40xx/lincoln60/scripts/Make.defs index f43cf13cb5..f220708477 100644 --- a/boards/arm/lpc17xx_40xx/lincoln60/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/lincoln60/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/Make.defs b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/Make.defs index 225f9e7706..80dd4b56b0 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/configs/knsh/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/Make.defs b/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/Make.defs index b233bcbceb..cd91098fcc 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpc4088-devkit/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/Make.defs b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/Make.defs index 3313298f1d..7214b1dc67 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/configs/knsh/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/Make.defs b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/Make.defs index 16dc34f91e..9e833bf3d8 100644 --- a/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpc4088-quickstart/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/thttpd/Make.defs b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/thttpd/Make.defs index 2b96d455fe..d59aa9dbae 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/thttpd/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/configs/thttpd/Make.defs @@ -28,10 +28,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/scripts/Make.defs b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/scripts/Make.defs index e125b47972..16055a659a 100644 --- a/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/lpcxpresso-lpc1768/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs b/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs index cb30e3dbca..8bbb3c262b 100644 --- a/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/lx_cpu/scripts/Make.defs @@ -36,10 +36,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/mbed/scripts/Make.defs b/boards/arm/lpc17xx_40xx/mbed/scripts/Make.defs index e99cf30daf..781687d24e 100644 --- a/boards/arm/lpc17xx_40xx/mbed/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/mbed/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/mcb1700/scripts/Make.defs b/boards/arm/lpc17xx_40xx/mcb1700/scripts/Make.defs index 6d75659573..30ead2a06d 100644 --- a/boards/arm/lpc17xx_40xx/mcb1700/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/mcb1700/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-binfs/Make.defs b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-binfs/Make.defs index 5468c779e5..094f17aac2 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-binfs/Make.defs +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-binfs/Make.defs @@ -27,10 +27,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-nxflat/Make.defs b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-nxflat/Make.defs index f51b51f241..bcc7dafc4b 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-nxflat/Make.defs +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/thttpd-nxflat/Make.defs @@ -27,10 +27,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/scripts/Make.defs b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/scripts/Make.defs index b048872e78..a999643913 100644 --- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/scripts/Make.defs @@ -27,10 +27,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/Make.defs b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/Make.defs index eba9c72540..2469e6c7af 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knsh/Make.defs +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knsh/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/Make.defs b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/Make.defs index 0035bade9d..a3d7822011 100644 --- a/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/Make.defs +++ b/boards/arm/lpc17xx_40xx/open1788/configs/knxterm/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/open1788/scripts/Make.defs b/boards/arm/lpc17xx_40xx/open1788/scripts/Make.defs index 8debdabca4..88bcbdad26 100644 --- a/boards/arm/lpc17xx_40xx/open1788/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/open1788/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/Make.defs b/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/Make.defs index bbb5415c63..f2f6ae7431 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/Make.defs +++ b/boards/arm/lpc17xx_40xx/pnev5180b/configs/knsh/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/lpc17xx_40xx/pnev5180b/scripts/Make.defs b/boards/arm/lpc17xx_40xx/pnev5180b/scripts/Make.defs index 0476b9c20c..d4aa9824c0 100644 --- a/boards/arm/lpc17xx_40xx/pnev5180b/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/pnev5180b/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/lpc17xx_40xx/u-blox-c027/scripts/Make.defs b/boards/arm/lpc17xx_40xx/u-blox-c027/scripts/Make.defs index 04a72c29e2..4f1fae42c2 100644 --- a/boards/arm/lpc17xx_40xx/u-blox-c027/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/u-blox-c027/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)u-blox-c027.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/scripts/Make.defs b/boards/arm/lpc17xx_40xx/zkit-arm-1769/scripts/Make.defs index 8bff48a574..540d2f1053 100644 --- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/scripts/Make.defs +++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/scripts/Make.defs @@ -28,10 +28,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc214x/mcu123-lpc214x/scripts/Make.defs b/boards/arm/lpc214x/mcu123-lpc214x/scripts/Make.defs index e6d75e686d..e91a6a0d14 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/scripts/Make.defs +++ b/boards/arm/lpc214x/mcu123-lpc214x/scripts/Make.defs @@ -45,10 +45,6 @@ ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else diff --git a/boards/arm/lpc214x/zp214xpa/scripts/Make.defs b/boards/arm/lpc214x/zp214xpa/scripts/Make.defs index d1f2865a4b..42c4add794 100644 --- a/boards/arm/lpc214x/zp214xpa/scripts/Make.defs +++ b/boards/arm/lpc214x/zp214xpa/scripts/Make.defs @@ -45,10 +45,6 @@ ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else diff --git a/boards/arm/lpc2378/olimex-lpc2378/scripts/Make.defs b/boards/arm/lpc2378/olimex-lpc2378/scripts/Make.defs index 1e41bf48ed..5a7f201582 100644 --- a/boards/arm/lpc2378/olimex-lpc2378/scripts/Make.defs +++ b/boards/arm/lpc2378/olimex-lpc2378/scripts/Make.defs @@ -45,10 +45,6 @@ ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else diff --git a/boards/arm/lpc31xx/ea3131/configs/pgnsh/Make.defs b/boards/arm/lpc31xx/ea3131/configs/pgnsh/Make.defs index 855e061aa9..cab21868ef 100644 --- a/boards/arm/lpc31xx/ea3131/configs/pgnsh/Make.defs +++ b/boards/arm/lpc31xx/ea3131/configs/pgnsh/Make.defs @@ -35,10 +35,6 @@ else OLDGCC = n endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft else diff --git a/boards/arm/lpc31xx/ea3131/scripts/Make.defs b/boards/arm/lpc31xx/ea3131/scripts/Make.defs index c997059c12..2d1f6d1422 100644 --- a/boards/arm/lpc31xx/ea3131/scripts/Make.defs +++ b/boards/arm/lpc31xx/ea3131/scripts/Make.defs @@ -35,10 +35,6 @@ else OLDGCC = n endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft else diff --git a/boards/arm/lpc31xx/ea3152/scripts/Make.defs b/boards/arm/lpc31xx/ea3152/scripts/Make.defs index f46387a86f..7b6b05803c 100644 --- a/boards/arm/lpc31xx/ea3152/scripts/Make.defs +++ b/boards/arm/lpc31xx/ea3152/scripts/Make.defs @@ -35,10 +35,6 @@ else OLDGCC = n endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft else diff --git a/boards/arm/lpc31xx/olimex-lpc-h3131/scripts/Make.defs b/boards/arm/lpc31xx/olimex-lpc-h3131/scripts/Make.defs index 19c399683d..e158b20e96 100644 --- a/boards/arm/lpc31xx/olimex-lpc-h3131/scripts/Make.defs +++ b/boards/arm/lpc31xx/olimex-lpc-h3131/scripts/Make.defs @@ -35,10 +35,6 @@ else OLDGCC = n endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mtune=arm9tdmi -march=armv5te -mfloat-abi=soft else diff --git a/boards/arm/lpc43xx/bambino-200e/scripts/Make.defs b/boards/arm/lpc43xx/bambino-200e/scripts/Make.defs index 02c8a42ad1..5470efa3a8 100644 --- a/boards/arm/lpc43xx/bambino-200e/scripts/Make.defs +++ b/boards/arm/lpc43xx/bambino-200e/scripts/Make.defs @@ -42,10 +42,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc43xx/lpc4330-xplorer/scripts/Make.defs b/boards/arm/lpc43xx/lpc4330-xplorer/scripts/Make.defs index ca472cb009..ecfcc6e658 100644 --- a/boards/arm/lpc43xx/lpc4330-xplorer/scripts/Make.defs +++ b/boards/arm/lpc43xx/lpc4330-xplorer/scripts/Make.defs @@ -42,10 +42,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc43xx/lpc4337-ws/scripts/Make.defs b/boards/arm/lpc43xx/lpc4337-ws/scripts/Make.defs index c8fc1d7c87..ba5cb6702f 100644 --- a/boards/arm/lpc43xx/lpc4337-ws/scripts/Make.defs +++ b/boards/arm/lpc43xx/lpc4337-ws/scripts/Make.defs @@ -42,10 +42,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc43xx/lpc4357-evb/scripts/Make.defs b/boards/arm/lpc43xx/lpc4357-evb/scripts/Make.defs index 5bfd8ad3a5..f484a9e860 100644 --- a/boards/arm/lpc43xx/lpc4357-evb/scripts/Make.defs +++ b/boards/arm/lpc43xx/lpc4357-evb/scripts/Make.defs @@ -42,10 +42,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc43xx/lpc4370-link2/scripts/Make.defs b/boards/arm/lpc43xx/lpc4370-link2/scripts/Make.defs index 4d62339bbe..1142044819 100644 --- a/boards/arm/lpc43xx/lpc4370-link2/scripts/Make.defs +++ b/boards/arm/lpc43xx/lpc4370-link2/scripts/Make.defs @@ -42,10 +42,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/Make.defs b/boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/Make.defs index a26d7150e7..b67cf9c9eb 100644 --- a/boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/Make.defs +++ b/boards/arm/lpc54xx/lpcxpresso-lpc54628/scripts/Make.defs @@ -25,13 +25,8 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs # Setup for the kind of memory that we are executing from LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/max326xx/max32660-evsys/scripts/Make.defs b/boards/arm/max326xx/max32660-evsys/scripts/Make.defs index 23a382c87c..eb20fbb2a5 100644 --- a/boards/arm/max326xx/max32660-evsys/scripts/Make.defs +++ b/boards/arm/max326xx/max32660-evsys/scripts/Make.defs @@ -30,11 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/moxart/moxa/scripts/Make.defs b/boards/arm/moxart/moxa/scripts/Make.defs index a2594f6860..26b99bca5a 100644 --- a/boards/arm/moxart/moxa/scripts/Make.defs +++ b/boards/arm/moxart/moxa/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)moxa.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -mno-thumb-interwork -march=armv4 -Uarm ARCHCXXFLAGS += -mno-thumb-interwork -march=armv4 -Uarm ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/arm/nrf52/nrf52-feather/scripts/Make.defs b/boards/arm/nrf52/nrf52-feather/scripts/Make.defs index 4d6d88b576..28efa46eab 100644 --- a/boards/arm/nrf52/nrf52-feather/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52-feather/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nrf52/nrf52832-dk/scripts/Make.defs b/boards/arm/nrf52/nrf52832-dk/scripts/Make.defs index bc6d17e539..4f7cb77cbe 100644 --- a/boards/arm/nrf52/nrf52832-dk/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52832-dk/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nrf52/nrf52832-mdk/scripts/Make.defs b/boards/arm/nrf52/nrf52832-mdk/scripts/Make.defs index db1f4b585f..d4ef530d86 100644 --- a/boards/arm/nrf52/nrf52832-mdk/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52832-mdk/scripts/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) CC = $(CROSSDEV)gcc @@ -39,10 +38,6 @@ OBJDUMP = $(CROSSDEV)objdump ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nrf52/nrf52832-sparkfun/scripts/Make.defs b/boards/arm/nrf52/nrf52832-sparkfun/scripts/Make.defs index ef0f7d8deb..2cfb08e3a3 100644 --- a/boards/arm/nrf52/nrf52832-sparkfun/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52832-sparkfun/scripts/Make.defs @@ -23,7 +23,6 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) CC = $(CROSSDEV)gcc @@ -39,10 +38,6 @@ OBJDUMP = $(CROSSDEV)objdump ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nrf52/nrf52840-dk/scripts/Make.defs b/boards/arm/nrf52/nrf52840-dk/scripts/Make.defs index 10e910347d..bf2c2f5be1 100644 --- a/boards/arm/nrf52/nrf52840-dk/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52840-dk/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nrf52/nrf52840-dongle/scripts/Make.defs b/boards/arm/nrf52/nrf52840-dongle/scripts/Make.defs index 6e15d18701..7ad5d695f5 100644 --- a/boards/arm/nrf52/nrf52840-dongle/scripts/Make.defs +++ b/boards/arm/nrf52/nrf52840-dongle/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash_config.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/nuc1xx/nutiny-nuc120/scripts/Make.defs b/boards/arm/nuc1xx/nutiny-nuc120/scripts/Make.defs index 4525002f58..cbde66be36 100644 --- a/boards/arm/nuc1xx/nutiny-nuc120/scripts/Make.defs +++ b/boards/arm/nuc1xx/nutiny-nuc120/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = nutiny-nuc120.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/phy62xx/phy6222/scripts/Make.defs b/boards/arm/phy62xx/phy6222/scripts/Make.defs index 81b9528c8c..fce54b60e0 100644 --- a/boards/arm/phy62xx/phy6222/scripts/Make.defs +++ b/boards/arm/phy62xx/phy6222/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/rp2040/pimoroni-tiny2040/scripts/Make.defs b/boards/arm/rp2040/pimoroni-tiny2040/scripts/Make.defs index d696debda1..a9423daede 100644 --- a/boards/arm/rp2040/pimoroni-tiny2040/scripts/Make.defs +++ b/boards/arm/rp2040/pimoroni-tiny2040/scripts/Make.defs @@ -31,10 +31,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/rp2040/raspberrypi-pico/scripts/Make.defs b/boards/arm/rp2040/raspberrypi-pico/scripts/Make.defs index 2f6af22d98..0daad7ed08 100644 --- a/boards/arm/rp2040/raspberrypi-pico/scripts/Make.defs +++ b/boards/arm/rp2040/raspberrypi-pico/scripts/Make.defs @@ -31,10 +31,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/s32k1xx/s32k118evb/scripts/Make.defs b/boards/arm/s32k1xx/s32k118evb/scripts/Make.defs index d797c0bd36..bb1de6efaf 100644 --- a/boards/arm/s32k1xx/s32k118evb/scripts/Make.defs +++ b/boards/arm/s32k1xx/s32k118evb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/s32k1xx/s32k144evb/scripts/Make.defs b/boards/arm/s32k1xx/s32k144evb/scripts/Make.defs index 86db40e9bf..650dbbb078 100644 --- a/boards/arm/s32k1xx/s32k144evb/scripts/Make.defs +++ b/boards/arm/s32k1xx/s32k144evb/scripts/Make.defs @@ -33,10 +33,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) $(warning, LDSCRIPT is $(LDSCRIPT)) $(warning, ARCHSCRIPT is $(ARCHSCRIPT)) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/s32k1xx/s32k146evb/scripts/Make.defs b/boards/arm/s32k1xx/s32k146evb/scripts/Make.defs index b32e34a99d..d5386d5d4d 100644 --- a/boards/arm/s32k1xx/s32k146evb/scripts/Make.defs +++ b/boards/arm/s32k1xx/s32k146evb/scripts/Make.defs @@ -33,10 +33,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) $(warning, LDSCRIPT is $(LDSCRIPT)) $(warning, ARCHSCRIPT is $(ARCHSCRIPT)) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/s32k1xx/s32k148evb/scripts/Make.defs b/boards/arm/s32k1xx/s32k148evb/scripts/Make.defs index 8b3cb47701..641ec5ee14 100644 --- a/boards/arm/s32k1xx/s32k148evb/scripts/Make.defs +++ b/boards/arm/s32k1xx/s32k148evb/scripts/Make.defs @@ -33,10 +33,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) $(warning, LDSCRIPT is $(LDSCRIPT)) $(warning, ARCHSCRIPT is $(ARCHSCRIPT)) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/s32k1xx/ucans32k146/scripts/Make.defs b/boards/arm/s32k1xx/ucans32k146/scripts/Make.defs index 21619a76a4..3dab858fc0 100644 --- a/boards/arm/s32k1xx/ucans32k146/scripts/Make.defs +++ b/boards/arm/s32k1xx/ucans32k146/scripts/Make.defs @@ -33,10 +33,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) $(warning, LDSCRIPT is $(LDSCRIPT)) $(warning, ARCHSCRIPT is $(ARCHSCRIPT)) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/arduino-due/scripts/Make.defs b/boards/arm/sam34/arduino-due/scripts/Make.defs index eeda40956b..12af6df948 100644 --- a/boards/arm/sam34/arduino-due/scripts/Make.defs +++ b/boards/arm/sam34/arduino-due/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)arduino-due.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/flipnclick-sam3x/scripts/Make.defs b/boards/arm/sam34/flipnclick-sam3x/scripts/Make.defs index cf778c7d96..f868fc2ff0 100644 --- a/boards/arm/sam34/flipnclick-sam3x/scripts/Make.defs +++ b/boards/arm/sam34/flipnclick-sam3x/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam3u-ek/configs/knsh/Make.defs b/boards/arm/sam34/sam3u-ek/configs/knsh/Make.defs index 6aa1d0963c..1a4ac44ba4 100644 --- a/boards/arm/sam34/sam3u-ek/configs/knsh/Make.defs +++ b/boards/arm/sam34/sam3u-ek/configs/knsh/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam3u-ek/scripts/Make.defs b/boards/arm/sam34/sam3u-ek/scripts/Make.defs index 05b367920c..b2f930effc 100644 --- a/boards/arm/sam34/sam3u-ek/scripts/Make.defs +++ b/boards/arm/sam34/sam3u-ek/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam4cmp-db/scripts/Make.defs b/boards/arm/sam34/sam4cmp-db/scripts/Make.defs index f322c2ffe5..a01b6bcc20 100644 --- a/boards/arm/sam34/sam4cmp-db/scripts/Make.defs +++ b/boards/arm/sam34/sam4cmp-db/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)sam4cmp-db.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam4e-ek/scripts/Make.defs b/boards/arm/sam34/sam4e-ek/scripts/Make.defs index 25c05fe5fc..5f832ba7a1 100644 --- a/boards/arm/sam34/sam4e-ek/scripts/Make.defs +++ b/boards/arm/sam34/sam4e-ek/scripts/Make.defs @@ -24,11 +24,7 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam4l-xplained/scripts/Make.defs b/boards/arm/sam34/sam4l-xplained/scripts/Make.defs index 09fb339d35..1eba3a76ad 100644 --- a/boards/arm/sam34/sam4l-xplained/scripts/Make.defs +++ b/boards/arm/sam34/sam4l-xplained/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)sam4l-xplained.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam4s-xplained-pro/scripts/Make.defs b/boards/arm/sam34/sam4s-xplained-pro/scripts/Make.defs index 344a10bbf7..ebdc114885 100644 --- a/boards/arm/sam34/sam4s-xplained-pro/scripts/Make.defs +++ b/boards/arm/sam34/sam4s-xplained-pro/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)sam4s-xplained-pro.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sam34/sam4s-xplained/scripts/Make.defs b/boards/arm/sam34/sam4s-xplained/scripts/Make.defs index d7863b60a2..db0be3dd99 100644 --- a/boards/arm/sam34/sam4s-xplained/scripts/Make.defs +++ b/boards/arm/sam34/sam4s-xplained/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)sam4s-xplained.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/giant-board/scripts/Make.defs b/boards/arm/sama5/giant-board/scripts/Make.defs index 3539ae43e5..d1c0569c71 100644 --- a/boards/arm/sama5/giant-board/scripts/Make.defs +++ b/boards/arm/sama5/giant-board/scripts/Make.defs @@ -36,10 +36,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/sama5d2-xult/scripts/Make.defs b/boards/arm/sama5/sama5d2-xult/scripts/Make.defs index 05baa291ff..3bf0164634 100644 --- a/boards/arm/sama5/sama5d2-xult/scripts/Make.defs +++ b/boards/arm/sama5/sama5d2-xult/scripts/Make.defs @@ -36,10 +36,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/sama5d3-xplained/scripts/Make.defs b/boards/arm/sama5/sama5d3-xplained/scripts/Make.defs index 9f087e0e5f..b78d14481e 100644 --- a/boards/arm/sama5/sama5d3-xplained/scripts/Make.defs +++ b/boards/arm/sama5/sama5d3-xplained/scripts/Make.defs @@ -32,10 +32,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/sama5d3x-ek/scripts/Make.defs b/boards/arm/sama5/sama5d3x-ek/scripts/Make.defs index ef17f14c2d..f828eff83d 100644 --- a/boards/arm/sama5/sama5d3x-ek/scripts/Make.defs +++ b/boards/arm/sama5/sama5d3x-ek/scripts/Make.defs @@ -52,10 +52,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/sama5d4-ek/configs/knsh/Make.defs b/boards/arm/sama5/sama5d4-ek/configs/knsh/Make.defs index f2d1eaa698..08bdedad7d 100644 --- a/boards/arm/sama5/sama5d4-ek/configs/knsh/Make.defs +++ b/boards/arm/sama5/sama5d4-ek/configs/knsh/Make.defs @@ -36,10 +36,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/sama5/sama5d4-ek/scripts/Make.defs b/boards/arm/sama5/sama5d4-ek/scripts/Make.defs index f7fbbad2bc..3319c071d3 100644 --- a/boards/arm/sama5/sama5d4-ek/scripts/Make.defs +++ b/boards/arm/sama5/sama5d4-ek/scripts/Make.defs @@ -36,10 +36,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd2l2/arduino-m0/scripts/Make.defs b/boards/arm/samd2l2/arduino-m0/scripts/Make.defs index e1a19c32e9..7a107c9907 100644 --- a/boards/arm/samd2l2/arduino-m0/scripts/Make.defs +++ b/boards/arm/samd2l2/arduino-m0/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd2l2/circuit-express/scripts/Make.defs b/boards/arm/samd2l2/circuit-express/scripts/Make.defs index db21a06369..19f08a974f 100644 --- a/boards/arm/samd2l2/circuit-express/scripts/Make.defs +++ b/boards/arm/samd2l2/circuit-express/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd2l2/samd20-xplained/scripts/Make.defs b/boards/arm/samd2l2/samd20-xplained/scripts/Make.defs index 963526f3b2..1b2a43d97d 100644 --- a/boards/arm/samd2l2/samd20-xplained/scripts/Make.defs +++ b/boards/arm/samd2l2/samd20-xplained/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd2l2/samd21-xplained/scripts/Make.defs b/boards/arm/samd2l2/samd21-xplained/scripts/Make.defs index 6c1f207d4a..904e255d53 100644 --- a/boards/arm/samd2l2/samd21-xplained/scripts/Make.defs +++ b/boards/arm/samd2l2/samd21-xplained/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd2l2/saml21-xplained/scripts/Make.defs b/boards/arm/samd2l2/saml21-xplained/scripts/Make.defs index 37190a393c..9029cf3da5 100644 --- a/boards/arm/samd2l2/saml21-xplained/scripts/Make.defs +++ b/boards/arm/samd2l2/saml21-xplained/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd5e5/metro-m4/scripts/Make.defs b/boards/arm/samd5e5/metro-m4/scripts/Make.defs index cd02369ce9..e46dac47e8 100644 --- a/boards/arm/samd5e5/metro-m4/scripts/Make.defs +++ b/boards/arm/samd5e5/metro-m4/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samd5e5/same54-xplained-pro/scripts/Make.defs b/boards/arm/samd5e5/same54-xplained-pro/scripts/Make.defs index da14fd9a82..4abf269caa 100644 --- a/boards/arm/samd5e5/same54-xplained-pro/scripts/Make.defs +++ b/boards/arm/samd5e5/same54-xplained-pro/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samv7/same70-qmtech/scripts/Make.defs b/boards/arm/samv7/same70-qmtech/scripts/Make.defs index 6f0e91bd67..d7053cadd7 100644 --- a/boards/arm/samv7/same70-qmtech/scripts/Make.defs +++ b/boards/arm/samv7/same70-qmtech/scripts/Make.defs @@ -35,11 +35,7 @@ else LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)$(notdir $(SCRIPTOUT).template) endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samv7/same70-xplained/scripts/Make.defs b/boards/arm/samv7/same70-xplained/scripts/Make.defs index 51dffbc923..51bda97795 100644 --- a/boards/arm/samv7/same70-xplained/scripts/Make.defs +++ b/boards/arm/samv7/same70-xplained/scripts/Make.defs @@ -35,11 +35,7 @@ else LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)$(notdir $(SCRIPTOUT).template) endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samv7/samv71-xult/configs/knsh/Make.defs b/boards/arm/samv7/samv71-xult/configs/knsh/Make.defs index 1dabdf7a0d..a4989f71d5 100644 --- a/boards/arm/samv7/samv71-xult/configs/knsh/Make.defs +++ b/boards/arm/samv7/samv71-xult/configs/knsh/Make.defs @@ -41,11 +41,7 @@ else ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/samv7/samv71-xult/scripts/Make.defs b/boards/arm/samv7/samv71-xult/scripts/Make.defs index ae6f7331b2..d3474fcd27 100644 --- a/boards/arm/samv7/samv71-xult/scripts/Make.defs +++ b/boards/arm/samv7/samv71-xult/scripts/Make.defs @@ -35,11 +35,7 @@ else LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)$(notdir $(SCRIPTOUT).template) endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/axoloti/scripts/Make.defs b/boards/arm/stm32/axoloti/scripts/Make.defs index c7d66e3ee6..b087541c7b 100644 --- a/boards/arm/stm32/axoloti/scripts/Make.defs +++ b/boards/arm/stm32/axoloti/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/b-g431b-esc1/scripts/Make.defs b/boards/arm/stm32/b-g431b-esc1/scripts/Make.defs index d3ffaa2e39..605dba9fe7 100644 --- a/boards/arm/stm32/b-g431b-esc1/scripts/Make.defs +++ b/boards/arm/stm32/b-g431b-esc1/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -funwind-tables ARCHCXXFLAGS += -funwind-tables ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/arm/stm32/b-g474e-dpow1/scripts/Make.defs b/boards/arm/stm32/b-g474e-dpow1/scripts/Make.defs index 1c679d263b..6a1e0bf931 100644 --- a/boards/arm/stm32/b-g474e-dpow1/scripts/Make.defs +++ b/boards/arm/stm32/b-g474e-dpow1/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -funwind-tables ARCHCXXFLAGS += -funwind-tables ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/arm/stm32/clicker2-stm32/scripts/Make.defs b/boards/arm/stm32/clicker2-stm32/scripts/Make.defs index d644403c13..9b69cd802a 100644 --- a/boards/arm/stm32/clicker2-stm32/scripts/Make.defs +++ b/boards/arm/stm32/clicker2-stm32/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV7M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/stm32/cloudctrl/scripts/Make.defs b/boards/arm/stm32/cloudctrl/scripts/Make.defs index 6a125d9e4a..c1cd4ae56d 100644 --- a/boards/arm/stm32/cloudctrl/scripts/Make.defs +++ b/boards/arm/stm32/cloudctrl/scripts/Make.defs @@ -32,10 +32,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/emw3162/scripts/Make.defs b/boards/arm/stm32/emw3162/scripts/Make.defs index 0d243d6e1e..7c95fe92a1 100644 --- a/boards/arm/stm32/emw3162/scripts/Make.defs +++ b/boards/arm/stm32/emw3162/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/et-stm32-stamp/scripts/Make.defs b/boards/arm/stm32/et-stm32-stamp/scripts/Make.defs index 6b657d0fbf..f9fab0a879 100644 --- a/boards/arm/stm32/et-stm32-stamp/scripts/Make.defs +++ b/boards/arm/stm32/et-stm32-stamp/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/fire-stm32v2/scripts/Make.defs b/boards/arm/stm32/fire-stm32v2/scripts/Make.defs index f3b3c6d960..27fe890064 100644 --- a/boards/arm/stm32/fire-stm32v2/scripts/Make.defs +++ b/boards/arm/stm32/fire-stm32v2/scripts/Make.defs @@ -32,10 +32,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/hymini-stm32v/scripts/Make.defs b/boards/arm/stm32/hymini-stm32v/scripts/Make.defs index 5183454572..621aae3bb0 100644 --- a/boards/arm/stm32/hymini-stm32v/scripts/Make.defs +++ b/boards/arm/stm32/hymini-stm32v/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/maple/scripts/Make.defs b/boards/arm/stm32/maple/scripts/Make.defs index 392a58bdad..55c9cb11f4 100644 --- a/boards/arm/stm32/maple/scripts/Make.defs +++ b/boards/arm/stm32/maple/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/mikroe-stm32f4/scripts/Make.defs b/boards/arm/stm32/mikroe-stm32f4/scripts/Make.defs index 44b76cee11..c24431ef18 100644 --- a/boards/arm/stm32/mikroe-stm32f4/scripts/Make.defs +++ b/boards/arm/stm32/mikroe-stm32f4/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f103rb/scripts/Make.defs b/boards/arm/stm32/nucleo-f103rb/scripts/Make.defs index 5ba1792796..066f670a5d 100644 --- a/boards/arm/stm32/nucleo-f103rb/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f103rb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f207zg/scripts/Make.defs b/boards/arm/stm32/nucleo-f207zg/scripts/Make.defs index ad3e57fc57..d0c734ee56 100644 --- a/boards/arm/stm32/nucleo-f207zg/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f207zg/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f302r8/scripts/Make.defs b/boards/arm/stm32/nucleo-f302r8/scripts/Make.defs index c8e718a56a..b075cd7a8b 100644 --- a/boards/arm/stm32/nucleo-f302r8/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f302r8/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f303re/scripts/Make.defs b/boards/arm/stm32/nucleo-f303re/scripts/Make.defs index ecdd4a94de..8762395c86 100644 --- a/boards/arm/stm32/nucleo-f303re/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f303re/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f303ze/scripts/Make.defs b/boards/arm/stm32/nucleo-f303ze/scripts/Make.defs index 1df6e71486..0abb6a17c2 100644 --- a/boards/arm/stm32/nucleo-f303ze/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f303ze/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f334r8/scripts/Make.defs b/boards/arm/stm32/nucleo-f334r8/scripts/Make.defs index f78d003662..d030d3adac 100644 --- a/boards/arm/stm32/nucleo-f334r8/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f334r8/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f410rb/scripts/Make.defs b/boards/arm/stm32/nucleo-f410rb/scripts/Make.defs index c3f777b2e4..02bb80ba0a 100644 --- a/boards/arm/stm32/nucleo-f410rb/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f410rb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f410rb.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f412zg/scripts/Make.defs b/boards/arm/stm32/nucleo-f412zg/scripts/Make.defs index 6295bd273b..823ae146ba 100644 --- a/boards/arm/stm32/nucleo-f412zg/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f412zg/scripts/Make.defs @@ -23,13 +23,8 @@ include ${TOPDIR}/tools/Config.mk include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f412zg.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHDEFINES = diff --git a/boards/arm/stm32/nucleo-f429zi/scripts/Make.defs b/boards/arm/stm32/nucleo-f429zi/scripts/Make.defs index f69caffa67..bd9157fc88 100644 --- a/boards/arm/stm32/nucleo-f429zi/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f429zi/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/nucleo-f446re/scripts/Make.defs b/boards/arm/stm32/nucleo-f446re/scripts/Make.defs index bb31bc3edc..1b3a041ff4 100644 --- a/boards/arm/stm32/nucleo-f446re/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f446re/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f446re.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(CONFIG_ARMV7M_TOOLCHAIN_CLANG),y) ARCHCFLAGS += -nostdlib -ffreestanding diff --git a/boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs b/boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs index cafdb98e38..9813125a6d 100644 --- a/boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-f4x1re/scripts/Make.defs @@ -24,18 +24,12 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ifeq ($(CONFIG_ARCH_CHIP_STM32F401RE),y) LDSCRIPT = f401re.ld -else -ifeq ($(CONFIG_ARCH_CHIP_STM32F411RE),y) +else ifeq ($(CONFIG_ARCH_CHIP_STM32F411RE),y) LDSCRIPT = f411re.ld endif -endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(CONFIG_ARMV7M_TOOLCHAIN_CLANG),y) ARCHCFLAGS += -nostdlib -ffreestanding diff --git a/boards/arm/stm32/nucleo-g431kb/scripts/Make.defs b/boards/arm/stm32/nucleo-g431kb/scripts/Make.defs index e5176674cc..2160c4d3e9 100755 --- a/boards/arm/stm32/nucleo-g431kb/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-g431kb/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -funwind-tables ARCHCXXFLAGS += -funwind-tables ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/arm/stm32/nucleo-g431rb/scripts/Make.defs b/boards/arm/stm32/nucleo-g431rb/scripts/Make.defs index 6dd074a3a4..49af1ff772 100644 --- a/boards/arm/stm32/nucleo-g431rb/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-g431rb/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -funwind-tables ARCHCXXFLAGS += -funwind-tables ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/arm/stm32/nucleo-l152re/scripts/Make.defs b/boards/arm/stm32/nucleo-l152re/scripts/Make.defs index 9f6ef51f19..55c24e00e4 100644 --- a/boards/arm/stm32/nucleo-l152re/scripts/Make.defs +++ b/boards/arm/stm32/nucleo-l152re/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-e407/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-e407/scripts/Make.defs index a63bbc357f..a0552afdf1 100644 --- a/boards/arm/stm32/olimex-stm32-e407/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-e407/scripts/Make.defs @@ -24,18 +24,12 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ifeq ($(CONFIG_ARCH_CHIP_STM32F407ZE),y) LDSCRIPT = f407ze.ld -else -ifeq ($(CONFIG_ARCH_CHIP_STM32F407ZG),y) +else ifeq ($(CONFIG_ARCH_CHIP_STM32F407ZG),y) LDSCRIPT = f407zg.ld endif -endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-h405/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-h405/scripts/Make.defs index 062e9abc3c..f8492ae335 100644 --- a/boards/arm/stm32/olimex-stm32-h405/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-h405/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-h407/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-h407/scripts/Make.defs index ebe171c3ef..3df01f9a8e 100644 --- a/boards/arm/stm32/olimex-stm32-h407/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-h407/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p107/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-p107/scripts/Make.defs index a2b3c770df..4fae12bfa7 100644 --- a/boards/arm/stm32/olimex-stm32-p107/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p107/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p207/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-p207/scripts/Make.defs index ba16cda613..53191292c0 100644 --- a/boards/arm/stm32/olimex-stm32-p207/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p207/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/Make.defs b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/Make.defs index 66a840aa26..8fe44bdb7b 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kelf/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kelf/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/Make.defs b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/Make.defs index 889a7cd740..6b6b532f50 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p407/configs/kmodule/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/Make.defs b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/Make.defs index e2da8d9272..1ce30bfab6 100644 --- a/boards/arm/stm32/olimex-stm32-p407/configs/knsh/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p407/configs/knsh/Make.defs @@ -28,10 +28,6 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimex-stm32-p407/scripts/Make.defs b/boards/arm/stm32/olimex-stm32-p407/scripts/Make.defs index c3bd88e83a..c40662c4f6 100644 --- a/boards/arm/stm32/olimex-stm32-p407/scripts/Make.defs +++ b/boards/arm/stm32/olimex-stm32-p407/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/olimexino-stm32/scripts/Make.defs b/boards/arm/stm32/olimexino-stm32/scripts/Make.defs index 237f920e31..e1d7c13b04 100644 --- a/boards/arm/stm32/olimexino-stm32/scripts/Make.defs +++ b/boards/arm/stm32/olimexino-stm32/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/omnibusf4/scripts/Make.defs b/boards/arm/stm32/omnibusf4/scripts/Make.defs index 41d6bdcc7b..261b7c7726 100644 --- a/boards/arm/stm32/omnibusf4/scripts/Make.defs +++ b/boards/arm/stm32/omnibusf4/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/photon/scripts/Make.defs b/boards/arm/stm32/photon/scripts/Make.defs index ceb54e5c30..ddb9965b5d 100644 --- a/boards/arm/stm32/photon/scripts/Make.defs +++ b/boards/arm/stm32/photon/scripts/Make.defs @@ -35,10 +35,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) DFUSUFFIX = dfu-suffix DFUUTIL = dfu-util -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/shenzhou/scripts/Make.defs b/boards/arm/stm32/shenzhou/scripts/Make.defs index db9775a347..8bde29085d 100644 --- a/boards/arm/stm32/shenzhou/scripts/Make.defs +++ b/boards/arm/stm32/shenzhou/scripts/Make.defs @@ -35,10 +35,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) MKNXFLAT = mknxflat LDNXFLAT = ldnxflat -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm3210e-eval/scripts/Make.defs b/boards/arm/stm32/stm3210e-eval/scripts/Make.defs index 7b31354858..20772398d4 100644 --- a/boards/arm/stm32/stm3210e-eval/scripts/Make.defs +++ b/boards/arm/stm32/stm3210e-eval/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm3220g-eval/scripts/Make.defs b/boards/arm/stm32/stm3220g-eval/scripts/Make.defs index f05b8fa5e0..429fea22ab 100644 --- a/boards/arm/stm32/stm3220g-eval/scripts/Make.defs +++ b/boards/arm/stm32/stm3220g-eval/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm3240g-eval/configs/knxwm/Make.defs b/boards/arm/stm32/stm3240g-eval/configs/knxwm/Make.defs index e1af39229c..c95f076750 100644 --- a/boards/arm/stm32/stm3240g-eval/configs/knxwm/Make.defs +++ b/boards/arm/stm32/stm3240g-eval/configs/knxwm/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)memory.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCXXFLAGS += -fpermissive ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/arm/stm32/stm3240g-eval/scripts/Make.defs b/boards/arm/stm32/stm3240g-eval/scripts/Make.defs index a862d38328..ac05cf4785 100644 --- a/boards/arm/stm32/stm3240g-eval/scripts/Make.defs +++ b/boards/arm/stm32/stm3240g-eval/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32_tiny/scripts/Make.defs b/boards/arm/stm32/stm32_tiny/scripts/Make.defs index ed42381a9a..5c7bd3970c 100644 --- a/boards/arm/stm32/stm32_tiny/scripts/Make.defs +++ b/boards/arm/stm32/stm32_tiny/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32butterfly2/scripts/Make.defs b/boards/arm/stm32/stm32butterfly2/scripts/Make.defs index aa8adb27dd..90a2427f6b 100644 --- a/boards/arm/stm32/stm32butterfly2/scripts/Make.defs +++ b/boards/arm/stm32/stm32butterfly2/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f103-minimum/scripts/Make.defs b/boards/arm/stm32/stm32f103-minimum/scripts/Make.defs index 1fa8a881f4..ed5c3c928f 100644 --- a/boards/arm/stm32/stm32f103-minimum/scripts/Make.defs +++ b/boards/arm/stm32/stm32f103-minimum/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f334-disco/scripts/Make.defs b/boards/arm/stm32/stm32f334-disco/scripts/Make.defs index a9d6fa90c6..4fca9868bc 100644 --- a/boards/arm/stm32/stm32f334-disco/scripts/Make.defs +++ b/boards/arm/stm32/stm32f334-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f3discovery/scripts/Make.defs b/boards/arm/stm32/stm32f3discovery/scripts/Make.defs index a2fac6ad62..2f88377f77 100644 --- a/boards/arm/stm32/stm32f3discovery/scripts/Make.defs +++ b/boards/arm/stm32/stm32f3discovery/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f411-minimum/scripts/Make.defs b/boards/arm/stm32/stm32f411-minimum/scripts/Make.defs index 2bc4f33273..3a598dccfd 100644 --- a/boards/arm/stm32/stm32f411-minimum/scripts/Make.defs +++ b/boards/arm/stm32/stm32f411-minimum/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = stm32f411ce.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f411e-disco/scripts/Make.defs b/boards/arm/stm32/stm32f411e-disco/scripts/Make.defs index 90d19c50c4..37beea5f73 100644 --- a/boards/arm/stm32/stm32f411e-disco/scripts/Make.defs +++ b/boards/arm/stm32/stm32f411e-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f411ve.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f429i-disco/scripts/Make.defs b/boards/arm/stm32/stm32f429i-disco/scripts/Make.defs index d69332e018..fbd8da7d11 100644 --- a/boards/arm/stm32/stm32f429i-disco/scripts/Make.defs +++ b/boards/arm/stm32/stm32f429i-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32f4discovery/scripts/Make.defs b/boards/arm/stm32/stm32f4discovery/scripts/Make.defs index 2d7ce4b73a..88c2656898 100644 --- a/boards/arm/stm32/stm32f4discovery/scripts/Make.defs +++ b/boards/arm/stm32/stm32f4discovery/scripts/Make.defs @@ -23,14 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32ldiscovery/scripts/Make.defs b/boards/arm/stm32/stm32ldiscovery/scripts/Make.defs index a1f6634cbc..004dd2c86e 100644 --- a/boards/arm/stm32/stm32ldiscovery/scripts/Make.defs +++ b/boards/arm/stm32/stm32ldiscovery/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/stm32vldiscovery/scripts/Make.defs b/boards/arm/stm32/stm32vldiscovery/scripts/Make.defs index 52b6b27b74..fc1289354a 100644 --- a/boards/arm/stm32/stm32vldiscovery/scripts/Make.defs +++ b/boards/arm/stm32/stm32vldiscovery/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = stm32vldiscovery.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32/viewtool-stm32f107/scripts/Make.defs b/boards/arm/stm32/viewtool-stm32f107/scripts/Make.defs index 94dd266086..a505034524 100644 --- a/boards/arm/stm32/viewtool-stm32f107/scripts/Make.defs +++ b/boards/arm/stm32/viewtool-stm32f107/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/scripts/Make.defs b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/scripts/Make.defs index 2058cb9621..a59931bdb7 100644 --- a/boards/arm/stm32f0l0g0/b-l072z-lrwan1/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/b-l072z-lrwan1/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/nucleo-f072rb/scripts/Make.defs b/boards/arm/stm32f0l0g0/nucleo-f072rb/scripts/Make.defs index b7879b634d..f0fa5451a2 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f072rb/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-f072rb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/nucleo-f091rc/scripts/Make.defs b/boards/arm/stm32f0l0g0/nucleo-f091rc/scripts/Make.defs index b6eb6ea62d..0bccab5815 100644 --- a/boards/arm/stm32f0l0g0/nucleo-f091rc/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-f091rc/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/nucleo-g070rb/scripts/Make.defs b/boards/arm/stm32f0l0g0/nucleo-g070rb/scripts/Make.defs index d40cc1b885..e5ddbd1a21 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g070rb/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-g070rb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/nucleo-g071rb/scripts/Make.defs b/boards/arm/stm32f0l0g0/nucleo-g071rb/scripts/Make.defs index e833457c92..c0bcac8d99 100644 --- a/boards/arm/stm32f0l0g0/nucleo-g071rb/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-g071rb/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/nucleo-l073rz/scripts/Make.defs b/boards/arm/stm32f0l0g0/nucleo-l073rz/scripts/Make.defs index 2c101a9ef1..7e3edd9e22 100644 --- a/boards/arm/stm32f0l0g0/nucleo-l073rz/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/nucleo-l073rz/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/stm32f051-discovery/scripts/Make.defs b/boards/arm/stm32f0l0g0/stm32f051-discovery/scripts/Make.defs index 2d56b5fd23..a9016f4101 100644 --- a/boards/arm/stm32f0l0g0/stm32f051-discovery/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32f051-discovery/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f0l0g0/stm32f072-discovery/scripts/Make.defs b/boards/arm/stm32f0l0g0/stm32f072-discovery/scripts/Make.defs index 2c459ba004..28b42fa403 100644 --- a/boards/arm/stm32f0l0g0/stm32f072-discovery/scripts/Make.defs +++ b/boards/arm/stm32f0l0g0/stm32f072-discovery/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv6-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f722-nsh/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f722-nsh/Make.defs index ae1c832341..b69c8bd18a 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f722-nsh/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f722-nsh/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f722-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f746-evalos/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f746-evalos/Make.defs index 4a0e1328af..d27ba222fe 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f746-evalos/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f746-evalos/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f746-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f746-nsh/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f746-nsh/Make.defs index 268cfe5f80..10c7ce1e95 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f746-nsh/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f746-nsh/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f746-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f746-pysim/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f746-pysim/Make.defs index 193c62364e..d03c6031e1 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f746-pysim/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f746-pysim/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f746-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f767-evalos/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f767-evalos/Make.defs index 7fbca3a5e5..81caa44067 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f767-evalos/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f767-evalos/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f767-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f767-netnsh/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f767-netnsh/Make.defs index d4639224e8..ae2b1cf698 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f767-netnsh/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f767-netnsh/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f767-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/nucleo-144/configs/f767-nsh/Make.defs b/boards/arm/stm32f7/nucleo-144/configs/f767-nsh/Make.defs index d15fd72c3d..ec927d2413 100644 --- a/boards/arm/stm32f7/nucleo-144/configs/f767-nsh/Make.defs +++ b/boards/arm/stm32f7/nucleo-144/configs/f767-nsh/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = f767-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/stm32f746-ws/scripts/Make.defs b/boards/arm/stm32f7/stm32f746-ws/scripts/Make.defs index 30f35cd54f..f0fc020e86 100644 --- a/boards/arm/stm32f7/stm32f746-ws/scripts/Make.defs +++ b/boards/arm/stm32f7/stm32f746-ws/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs b/boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs index 63b6ff78b0..79402f13e2 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs +++ b/boards/arm/stm32f7/stm32f746g-disco/scripts/Make.defs @@ -23,14 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - - ifeq ($(CONFIG_ARMV7M_TOOLCHAIN_CLANG),y) ARCHCFLAGS += -nostdlib -ffreestanding ARCHCXXFLAGS += -nostdlib -ffreestanding diff --git a/boards/arm/stm32f7/stm32f769i-disco/scripts/Make.defs b/boards/arm/stm32f7/stm32f769i-disco/scripts/Make.defs index 546ed67a7b..0128e8a8cb 100644 --- a/boards/arm/stm32f7/stm32f769i-disco/scripts/Make.defs +++ b/boards/arm/stm32f7/stm32f769i-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32h7/nucleo-h743zi/scripts/Make.defs b/boards/arm/stm32h7/nucleo-h743zi/scripts/Make.defs index cd070706cc..4cc50d447b 100644 --- a/boards/arm/stm32h7/nucleo-h743zi/scripts/Make.defs +++ b/boards/arm/stm32h7/nucleo-h743zi/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32h7/nucleo-h743zi2/scripts/Make.defs b/boards/arm/stm32h7/nucleo-h743zi2/scripts/Make.defs index ef494fb86a..0ca8ddc29e 100644 --- a/boards/arm/stm32h7/nucleo-h743zi2/scripts/Make.defs +++ b/boards/arm/stm32h7/nucleo-h743zi2/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32h7/stm32h747i-disco/scripts/Make.defs b/boards/arm/stm32h7/stm32h747i-disco/scripts/Make.defs index a73c8918aa..928b2e96d7 100644 --- a/boards/arm/stm32h7/stm32h747i-disco/scripts/Make.defs +++ b/boards/arm/stm32h7/stm32h747i-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/b-l475e-iot01a/scripts/Make.defs b/boards/arm/stm32l4/b-l475e-iot01a/scripts/Make.defs index f5c736436d..5004ed0854 100644 --- a/boards/arm/stm32l4/b-l475e-iot01a/scripts/Make.defs +++ b/boards/arm/stm32l4/b-l475e-iot01a/scripts/Make.defs @@ -23,16 +23,12 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs # TODO add stm32 bootloader support -LDSCRIPT = flash.ld +LDSCRIPT = flash.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) # See http://dfu-util.sourceforge.net/ -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/nucleo-l432kc/scripts/Make.defs b/boards/arm/stm32l4/nucleo-l432kc/scripts/Make.defs index 239c7fdcdc..c27a511b9b 100644 --- a/boards/arm/stm32l4/nucleo-l432kc/scripts/Make.defs +++ b/boards/arm/stm32l4/nucleo-l432kc/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = l432kc.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/nucleo-l452re/scripts/Make.defs b/boards/arm/stm32l4/nucleo-l452re/scripts/Make.defs index abfd7e8800..cbbab356ff 100644 --- a/boards/arm/stm32l4/nucleo-l452re/scripts/Make.defs +++ b/boards/arm/stm32l4/nucleo-l452re/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = l452re-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs b/boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs index fdc3cc271e..5c68be47a6 100644 --- a/boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs +++ b/boards/arm/stm32l4/nucleo-l476rg/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = l476rg.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/nucleo-l496zg/scripts/Make.defs b/boards/arm/stm32l4/nucleo-l496zg/scripts/Make.defs index 7a108ff6e4..0800f9adcc 100644 --- a/boards/arm/stm32l4/nucleo-l496zg/scripts/Make.defs +++ b/boards/arm/stm32l4/nucleo-l496zg/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = l496zg-flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/stm32l476-mdk/scripts/Make.defs b/boards/arm/stm32l4/stm32l476-mdk/scripts/Make.defs index f6c1ebde29..4ce7b14fb1 100644 --- a/boards/arm/stm32l4/stm32l476-mdk/scripts/Make.defs +++ b/boards/arm/stm32l4/stm32l476-mdk/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = stm32l476-mdk.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/Make.defs b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/Make.defs index b2abeee908..34e5accd53 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/Make.defs +++ b/boards/arm/stm32l4/stm32l476vg-disco/configs/knsh/Make.defs @@ -28,10 +28,6 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/stm32l476vg-disco/scripts/Make.defs b/boards/arm/stm32l4/stm32l476vg-disco/scripts/Make.defs index 77fab867a5..bcff859353 100644 --- a/boards/arm/stm32l4/stm32l476vg-disco/scripts/Make.defs +++ b/boards/arm/stm32l4/stm32l476vg-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = stm32l476vg-disco.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/Make.defs b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/Make.defs index 4bcbb85bff..19cc22a2be 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/Make.defs +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/configs/knsh/Make.defs @@ -28,10 +28,6 @@ LDSCRIPT2 = kernel-space.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT1) ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT2) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l4/stm32l4r9ai-disco/scripts/Make.defs b/boards/arm/stm32l4/stm32l4r9ai-disco/scripts/Make.defs index c584678746..a97063eb12 100644 --- a/boards/arm/stm32l4/stm32l4r9ai-disco/scripts/Make.defs +++ b/boards/arm/stm32l4/stm32l4r9ai-disco/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = stm32l4r9ai-disco.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/stm32l5/nucleo-l552ze/scripts/Make.defs b/boards/arm/stm32l5/nucleo-l552ze/scripts/Make.defs index 0a58fc921a..d407866478 100644 --- a/boards/arm/stm32l5/nucleo-l552ze/scripts/Make.defs +++ b/boards/arm/stm32l5/nucleo-l552ze/scripts/Make.defs @@ -24,10 +24,6 @@ include ${TOPDIR}/arch/arm/src/armv8-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV8M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/stm32l5/stm32l562e-dk/scripts/Make.defs b/boards/arm/stm32l5/stm32l562e-dk/scripts/Make.defs index bd6f149260..c54749d5e8 100644 --- a/boards/arm/stm32l5/stm32l562e-dk/scripts/Make.defs +++ b/boards/arm/stm32l5/stm32l562e-dk/scripts/Make.defs @@ -24,10 +24,6 @@ include ${TOPDIR}/arch/arm/src/armv8-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tfm-ns.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV8M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/stm32u5/b-u585i-iot02a/scripts/Make.defs b/boards/arm/stm32u5/b-u585i-iot02a/scripts/Make.defs index 77813c41a3..4b5597c983 100644 --- a/boards/arm/stm32u5/b-u585i-iot02a/scripts/Make.defs +++ b/boards/arm/stm32u5/b-u585i-iot02a/scripts/Make.defs @@ -24,10 +24,6 @@ include ${TOPDIR}/arch/arm/src/armv8-m/Toolchain.defs ARCHSCRIPT = $(BOARD_DIR)$(DELIM)scripts$(DELIM)flash.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -endif - # enable precise stack overflow tracking ifeq ($(CONFIG_ARMV8M_STACKCHECK),y) INSTRUMENTATIONDEFINES = -finstrument-functions -ffixed-r10 diff --git a/boards/arm/str71x/olimex-strp711/scripts/Make.defs b/boards/arm/str71x/olimex-strp711/scripts/Make.defs index 27cd604950..7ad509b633 100644 --- a/boards/arm/str71x/olimex-strp711/scripts/Make.defs +++ b/boards/arm/str71x/olimex-strp711/scripts/Make.defs @@ -45,10 +45,6 @@ ifeq ("${CONFIG_DEBUG_FEATURES}","y") ARCHOPTIMIZATION = -g endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(OLDGCC),n) ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft else diff --git a/boards/arm/tiva/dk-tm4c129x/scripts/Make.defs b/boards/arm/tiva/dk-tm4c129x/scripts/Make.defs index 88e5350c43..dd6e062edb 100644 --- a/boards/arm/tiva/dk-tm4c129x/scripts/Make.defs +++ b/boards/arm/tiva/dk-tm4c129x/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/eagle100/scripts/Make.defs b/boards/arm/tiva/eagle100/scripts/Make.defs index 3f832d059f..f002df91c5 100644 --- a/boards/arm/tiva/eagle100/scripts/Make.defs +++ b/boards/arm/tiva/eagle100/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/ekk-lm3s9b96/scripts/Make.defs b/boards/arm/tiva/ekk-lm3s9b96/scripts/Make.defs index 0472c66aa1..92f2510582 100644 --- a/boards/arm/tiva/ekk-lm3s9b96/scripts/Make.defs +++ b/boards/arm/tiva/ekk-lm3s9b96/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ekk-lm3s9b96.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/launchxl-cc1310/scripts/Make.defs b/boards/arm/tiva/launchxl-cc1310/scripts/Make.defs index a2a2d7e44b..37bdc8688b 100644 --- a/boards/arm/tiva/launchxl-cc1310/scripts/Make.defs +++ b/boards/arm/tiva/launchxl-cc1310/scripts/Make.defs @@ -23,14 +23,9 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/launchxl-cc1312r1/scripts/Make.defs b/boards/arm/tiva/launchxl-cc1312r1/scripts/Make.defs index 8b4eab9c97..9e7bacf8d0 100644 --- a/boards/arm/tiva/launchxl-cc1312r1/scripts/Make.defs +++ b/boards/arm/tiva/launchxl-cc1312r1/scripts/Make.defs @@ -30,11 +30,7 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/lm3s6432-s2e/scripts/Make.defs b/boards/arm/tiva/lm3s6432-s2e/scripts/Make.defs index f582e05d8b..e3a095b1cc 100644 --- a/boards/arm/tiva/lm3s6432-s2e/scripts/Make.defs +++ b/boards/arm/tiva/lm3s6432-s2e/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)lm3s6432-s2e.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/lm3s6965-ek/scripts/Make.defs b/boards/arm/tiva/lm3s6965-ek/scripts/Make.defs index 17f4bed574..5df736fb07 100644 --- a/boards/arm/tiva/lm3s6965-ek/scripts/Make.defs +++ b/boards/arm/tiva/lm3s6965-ek/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/lm3s8962-ek/scripts/Make.defs b/boards/arm/tiva/lm3s8962-ek/scripts/Make.defs index 4326705abb..7d3b5dc61d 100644 --- a/boards/arm/tiva/lm3s8962-ek/scripts/Make.defs +++ b/boards/arm/tiva/lm3s8962-ek/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/lm4f120-launchpad/scripts/Make.defs b/boards/arm/tiva/lm4f120-launchpad/scripts/Make.defs index 17b28dd5a5..6239e69e2e 100644 --- a/boards/arm/tiva/lm4f120-launchpad/scripts/Make.defs +++ b/boards/arm/tiva/lm4f120-launchpad/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)lm4f120-launchpad.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/tm4c123g-launchpad/scripts/Make.defs b/boards/arm/tiva/tm4c123g-launchpad/scripts/Make.defs index 7454bc14ec..067e362aee 100644 --- a/boards/arm/tiva/tm4c123g-launchpad/scripts/Make.defs +++ b/boards/arm/tiva/tm4c123g-launchpad/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)tm4c123g-launchpad.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tiva/tm4c1294-launchpad/scripts/Make.defs b/boards/arm/tiva/tm4c1294-launchpad/scripts/Make.defs index e2f39ce567..ab356b9dcc 100644 --- a/boards/arm/tiva/tm4c1294-launchpad/scripts/Make.defs +++ b/boards/arm/tiva/tm4c1294-launchpad/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/tms570/launchxl-tms57004/scripts/Make.defs b/boards/arm/tms570/launchxl-tms57004/scripts/Make.defs index 070e4f47d5..e75a77ca8b 100644 --- a/boards/arm/tms570/launchxl-tms57004/scripts/Make.defs +++ b/boards/arm/tms570/launchxl-tms57004/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-r/Toolchain.defs LDSCRIPT = flash-sram.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCPUFLAGS = -mcpu=cortex-r4 -mbig-endian ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/arm/tms570/tms570ls31x-usb-kit/scripts/Make.defs b/boards/arm/tms570/tms570ls31x-usb-kit/scripts/Make.defs index 3d66be9a1f..364ff23c7a 100644 --- a/boards/arm/tms570/tms570ls31x-usb-kit/scripts/Make.defs +++ b/boards/arm/tms570/tms570ls31x-usb-kit/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-r/Toolchain.defs LDSCRIPT = flash-sram.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/xmc4/xmc4500-relax/scripts/Make.defs b/boards/arm/xmc4/xmc4500-relax/scripts/Make.defs index b3316d68cc..9e63a47ee4 100644 --- a/boards/arm/xmc4/xmc4500-relax/scripts/Make.defs +++ b/boards/arm/xmc4/xmc4500-relax/scripts/Make.defs @@ -23,14 +23,9 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/arm/xmc4/xmc4700-relax/scripts/Make.defs b/boards/arm/xmc4/xmc4700-relax/scripts/Make.defs index 69934a3dc2..e42a9a1dc6 100644 --- a/boards/arm/xmc4/xmc4700-relax/scripts/Make.defs +++ b/boards/arm/xmc4/xmc4700-relax/scripts/Make.defs @@ -23,14 +23,9 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/arm/src/armv7-m/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -endif - -ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef -fno-strict-aliasing +ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/avr/at32uc3/avr32dev1/scripts/Make.defs b/boards/avr/at32uc3/avr32dev1/scripts/Make.defs index 92c8ff4a4f..b0e56e54ee 100644 --- a/boards/avr/at32uc3/avr32dev1/scripts/Make.defs +++ b/boards/avr/at32uc3/avr32dev1/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/avr/src/avr32/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)avr32dev1.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -ffunction-sections -fdata-sections -fno-strict-aliasing -endif - ARCHCFLAGS = -muse-rodata-section ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/avr/at90usb/micropendous3/scripts/Make.defs b/boards/avr/at90usb/micropendous3/scripts/Make.defs index 98a8b51bcf..cf766964b4 100644 --- a/boards/avr/at90usb/micropendous3/scripts/Make.defs +++ b/boards/avr/at90usb/micropendous3/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/avr/src/avr/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)micropendous3.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/avr/at90usb/teensy-2.0/scripts/Make.defs b/boards/avr/at90usb/teensy-2.0/scripts/Make.defs index 9a0c7901f2..f42850c406 100644 --- a/boards/avr/at90usb/teensy-2.0/scripts/Make.defs +++ b/boards/avr/at90usb/teensy-2.0/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/avr/src/avr/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/avr/atmega/amber/scripts/Make.defs b/boards/avr/atmega/amber/scripts/Make.defs index 9e29563a20..4573658b90 100644 --- a/boards/avr/atmega/amber/scripts/Make.defs +++ b/boards/avr/atmega/amber/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/avr/src/avr/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)amber.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/avr/atmega/arduino-mega2560/scripts/Make.defs b/boards/avr/atmega/arduino-mega2560/scripts/Make.defs index 7771bd3693..1d433ffd5c 100644 --- a/boards/avr/atmega/arduino-mega2560/scripts/Make.defs +++ b/boards/avr/atmega/arduino-mega2560/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/avr/src/avr/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/avr/atmega/moteino-mega/scripts/Make.defs b/boards/avr/atmega/moteino-mega/scripts/Make.defs index 94711097d5..c9df44a9e4 100644 --- a/boards/avr/atmega/moteino-mega/scripts/Make.defs +++ b/boards/avr/atmega/moteino-mega/scripts/Make.defs @@ -24,10 +24,6 @@ include $(TOPDIR)/arch/avr/src/avr/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)ld.script -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs b/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs index 739dfadd75..d8286ceccc 100644 --- a/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs +++ b/boards/hc/m9s12/demo9s12ne64/scripts/Make.defs @@ -25,7 +25,6 @@ include $(TOPDIR)/tools/Config.mk # NuttX buildroot under Linux or Cygwin CROSSDEV = m9s12x-nuttx-elf- -MAXOPTIMIZATION = -Os ifeq ($(CONFIG_HCS12_NONBANKED),y) ARCHCPUFLAGS = -m9s12x -mshort -mnolong-calls @@ -46,7 +45,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) endif ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fomit-frame-pointer endif ARCHCFLAGS = -fno-common diff --git a/boards/hc/m9s12/ne64badge/scripts/Make.defs b/boards/hc/m9s12/ne64badge/scripts/Make.defs index fcd2fcb308..0b077b6337 100644 --- a/boards/hc/m9s12/ne64badge/scripts/Make.defs +++ b/boards/hc/m9s12/ne64badge/scripts/Make.defs @@ -25,7 +25,6 @@ include $(TOPDIR)/tools/Config.mk # NuttX buildroot under Linux or Cygwin CROSSDEV = m9s12x-nuttx-elf- -MAXOPTIMIZATION = -Os ifeq ($(CONFIG_HCS12_NONBANKED),y) ARCHCPUFLAGS = -m9s12x -mshort -mnolong-calls @@ -46,7 +45,7 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) endif ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fomit-frame-pointer endif ARCHCFLAGS = -fno-common diff --git a/boards/mips/pic32mx/mirtoo/scripts/Make.defs b/boards/mips/pic32mx/mirtoo/scripts/Make.defs index 6eb53beffd..ff890a5db4 100644 --- a/boards/mips/pic32mx/mirtoo/scripts/Make.defs +++ b/boards/mips/pic32mx/mirtoo/scripts/Make.defs @@ -25,10 +25,6 @@ include $(TOPDIR)/arch/mips/src/mips32/Toolchain.defs ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mx/pic32mx-starterkit/scripts/Make.defs b/boards/mips/pic32mx/pic32mx-starterkit/scripts/Make.defs index 0abbe47938..11295e7b76 100644 --- a/boards/mips/pic32mx/pic32mx-starterkit/scripts/Make.defs +++ b/boards/mips/pic32mx/pic32mx-starterkit/scripts/Make.defs @@ -41,10 +41,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mx/pic32mx7mmb/scripts/Make.defs b/boards/mips/pic32mx/pic32mx7mmb/scripts/Make.defs index 13faa87024..aecfd5fa9e 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/scripts/Make.defs +++ b/boards/mips/pic32mx/pic32mx7mmb/scripts/Make.defs @@ -41,10 +41,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mx/sure-pic32mx/scripts/Make.defs b/boards/mips/pic32mx/sure-pic32mx/scripts/Make.defs index 991e874015..e3ab690e56 100644 --- a/boards/mips/pic32mx/sure-pic32mx/scripts/Make.defs +++ b/boards/mips/pic32mx/sure-pic32mx/scripts/Make.defs @@ -41,10 +41,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mx/ubw32/scripts/Make.defs b/boards/mips/pic32mx/ubw32/scripts/Make.defs index e455a9b46b..9c78bb65f9 100644 --- a/boards/mips/pic32mx/ubw32/scripts/Make.defs +++ b/boards/mips/pic32mx/ubw32/scripts/Make.defs @@ -41,10 +41,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mz/chipkit-wifire/scripts/Make.defs b/boards/mips/pic32mz/chipkit-wifire/scripts/Make.defs index 9b1a257f17..f08977a579 100644 --- a/boards/mips/pic32mz/chipkit-wifire/scripts/Make.defs +++ b/boards/mips/pic32mz/chipkit-wifire/scripts/Make.defs @@ -51,10 +51,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mz/flipnclick-pic32mz/scripts/Make.defs b/boards/mips/pic32mz/flipnclick-pic32mz/scripts/Make.defs index b81a63b7d0..b35a3901c8 100644 --- a/boards/mips/pic32mz/flipnclick-pic32mz/scripts/Make.defs +++ b/boards/mips/pic32mz/flipnclick-pic32mz/scripts/Make.defs @@ -51,10 +51,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/mips/pic32mz/pic32mz-starterkit/scripts/Make.defs b/boards/mips/pic32mz/pic32mz-starterkit/scripts/Make.defs index 709a33a5e5..f8d4c2d20e 100644 --- a/boards/mips/pic32mz/pic32mz-starterkit/scripts/Make.defs +++ b/boards/mips/pic32mz/pic32mz-starterkit/scripts/Make.defs @@ -51,10 +51,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/misoc/lm32/misoc/scripts/Make.defs b/boards/misoc/lm32/misoc/scripts/Make.defs index 09b1b60d37..0b0ca1cf1d 100644 --- a/boards/misoc/lm32/misoc/scripts/Make.defs +++ b/boards/misoc/lm32/misoc/scripts/Make.defs @@ -32,10 +32,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/or1k/mor1kx/or1k/scripts/Make.defs b/boards/or1k/mor1kx/or1k/scripts/Make.defs index 5701011d4c..fa7ca11f36 100644 --- a/boards/or1k/mor1kx/or1k/scripts/Make.defs +++ b/boards/or1k/mor1kx/or1k/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/or1k/src/mor1kx/Toolchain.defs LDSCRIPT = flash.ld - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fomit-frame-pointer -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/risc-v/bl602/bl602evb/scripts/Make.defs b/boards/risc-v/bl602/bl602evb/scripts/Make.defs index 0cff2525e3..398e34cf05 100644 --- a/boards/risc-v/bl602/bl602evb/scripts/Make.defs +++ b/boards/risc-v/bl602/bl602evb/scripts/Make.defs @@ -26,13 +26,8 @@ ARCH_SRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src ARCH_INCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)include LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCPUFLAGS += -mno-relax ARCHCXXFLAGS += -pipe ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/risc-v/c906/smartl-c906/scripts/Make.defs b/boards/risc-v/c906/smartl-c906/scripts/Make.defs index c098b27f6f..2dbbcfedcf 100644 --- a/boards/risc-v/c906/smartl-c906/scripts/Make.defs +++ b/boards/risc-v/c906/smartl-c906/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # The following options are for the toolchain from T-HEAD. # For more info ahout the T-HEAD ISA extensions, please refer to the C906 user guide. # ARCHCPUFLAGS = -march=rv64gcxthead -mabi=lp64d -mtune=c906 -mcmodel=medany diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/Make.defs b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/Make.defs index eaa5000d32..db7f6e5eda 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/scripts/Make.defs +++ b/boards/risc-v/esp32c3/esp32c3-devkit/scripts/Make.defs @@ -33,10 +33,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32c3_rom.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCFLAGS += -msmall-data-limit=0 ARCHCXXFLAGS += -msmall-data-limit=0 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/risc-v/fe310/hifive1-revb/scripts/Make.defs b/boards/risc-v/fe310/hifive1-revb/scripts/Make.defs index 0a32d0f9d2..31711ff732 100644 --- a/boards/risc-v/fe310/hifive1-revb/scripts/Make.defs +++ b/boards/risc-v/fe310/hifive1-revb/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/risc-v/k210/maix-bit/scripts/Make.defs b/boards/risc-v/k210/maix-bit/scripts/Make.defs index 9c41ee701e..5caf91685c 100644 --- a/boards/risc-v/k210/maix-bit/scripts/Make.defs +++ b/boards/risc-v/k210/maix-bit/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/risc-v/src/common/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCPUFLAGS += -mcmodel=medany -mstrict-align ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/risc-v/litex/arty_a7/scripts/Make.defs b/boards/risc-v/litex/arty_a7/scripts/Make.defs index 39bea67cc7..aedc497d5a 100644 --- a/boards/risc-v/litex/arty_a7/scripts/Make.defs +++ b/boards/risc-v/litex/arty_a7/scripts/Make.defs @@ -23,13 +23,8 @@ include $(TOPDIR)/tools/Config.mk include $(TOPDIR)/arch/risc-v/src/common/Toolchain.defs LDSCRIPT = ld.script - ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 diff --git a/boards/risc-v/mpfs/icicle/scripts/Make.defs b/boards/risc-v/mpfs/icicle/scripts/Make.defs index 12a5f615e7..228f2f8032 100755 --- a/boards/risc-v/mpfs/icicle/scripts/Make.defs +++ b/boards/risc-v/mpfs/icicle/scripts/Make.defs @@ -45,10 +45,6 @@ ifneq ($(LDMEMORY),) endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # The following options are for the toolchain from T-HEAD. # For more info ahout the T-HEAD ISA extensions, please refer to the MPFS user guide. # ARCHCPUFLAGS = -march=rv64gcxthead -mabi=lp64d -mcmodel=medany diff --git a/boards/risc-v/mpfs/m100pfsevp/scripts/Make.defs b/boards/risc-v/mpfs/m100pfsevp/scripts/Make.defs index d54235f663..5c2cd0a703 100755 --- a/boards/risc-v/mpfs/m100pfsevp/scripts/Make.defs +++ b/boards/risc-v/mpfs/m100pfsevp/scripts/Make.defs @@ -30,10 +30,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # The following options are for the toolchain from T-HEAD. # For more info ahout the T-HEAD ISA extensions, please refer to the MPFS user guide. # ARCHCPUFLAGS = -march=rv64gcxthead -mabi=lp64d -mcmodel=medany diff --git a/boards/risc-v/qemu-rv/rv-virt/scripts/Make.defs b/boards/risc-v/qemu-rv/rv-virt/scripts/Make.defs index b5f64bd13e..82eb316db4 100644 --- a/boards/risc-v/qemu-rv/rv-virt/scripts/Make.defs +++ b/boards/risc-v/qemu-rv/rv-virt/scripts/Make.defs @@ -28,10 +28,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHCPUFLAGS += -mcmodel=medany ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef diff --git a/boards/risc-v/rv32m1/rv32m1-vega/scripts/Make.defs b/boards/risc-v/rv32m1/rv32m1-vega/scripts/Make.defs index 5e1d4bc228..31038e3ebd 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/scripts/Make.defs +++ b/boards/risc-v/rv32m1/rv32m1-vega/scripts/Make.defs @@ -34,10 +34,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)$(LDSCRIPT) -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ifeq ($(CONFIG_RV32M1_OPENISA_TOOLCHAIN),y) ifdef CONFIG_ARCH_RISCV_INTXCPT_EXTREGS ifeq ($(filter 0 1 2 3 4 5 , $(CONFIG_ARCH_RISCV_INTXCPT_EXTREGS)),) diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index ef671f9b41..f51d30e3b5 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -41,18 +41,18 @@ ARCHDEFINES += -U__NetBSD__ -U__linux__ -U__sun__ -U__unix__ ARCHDEFINES += -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g - ARCHOPTIMIZATIONRUST = -g + ARCHOPTIMIZATION += -g + ARCHOPTIMIZATIONRUST += -g endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) - MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL) -else - MAXOPTIMIZATION ?= -O2 + ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL) +else ifeq ($(CONFIG_DEBUG_FULLOPT),y) + ARCHOPTIMIZATION += -O2 endif ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing + ARCHOPTIMIZATION += -fno-strict-aliasing else ARCHOPTIMIZATIONRUST += -C opt-level=0 endif diff --git a/boards/sparc/bm3803/xx3803/scripts/Make.defs b/boards/sparc/bm3803/xx3803/scripts/Make.defs index b4db1f6a0d..ca29ae7526 100644 --- a/boards/sparc/bm3803/xx3803/scripts/Make.defs +++ b/boards/sparc/bm3803/xx3803/scripts/Make.defs @@ -23,10 +23,10 @@ include ${TOPDIR}/tools/Config.mk include ${TOPDIR}/arch/sparc/src/sparc_v8/Toolchain.defs LDSCRIPT = linksparc.ld +ARCHSCRIPT += $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) ARCHINCLUDES = -I. -isystem $(call CONVERT_PATH,$(TOPDIR)/include) ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem $(call CONVERT_PATH,$(TOPDIR)/include/cxx) -ARCHSCRIPT += $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ @@ -38,10 +38,6 @@ NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # ARCHOPTIMIZATION += -fno-zero-initialized-in-bss # 20210818 zouboan diff --git a/boards/sparc/bm3823/xx3823/scripts/Make.defs b/boards/sparc/bm3823/xx3823/scripts/Make.defs index 0d441c072e..d52a0ac061 100644 --- a/boards/sparc/bm3823/xx3823/scripts/Make.defs +++ b/boards/sparc/bm3823/xx3823/scripts/Make.defs @@ -23,10 +23,10 @@ include ${TOPDIR}/tools/Config.mk include ${TOPDIR}/arch/sparc/src/sparc_v8/Toolchain.defs LDSCRIPT = linksparc.ld +ARCHSCRIPT += $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) ARCHINCLUDES = -I. -isystem $(call CONVERT_PATH,$(TOPDIR)/include) ARCHXXINCLUDES = $(ARCHINCLUDES) -isystem $(call CONVERT_PATH,$(TOPDIR)/include/cxx) -ARCHSCRIPT += $(TOPDIR)/boards/$(CONFIG_ARCH)/$(CONFIG_ARCH_CHIP)/$(CONFIG_ARCH_BOARD)/scripts/$(LDSCRIPT) CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ @@ -38,10 +38,6 @@ NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - # ARCHOPTIMIZATION += -fno-zero-initialized-in-bss ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef diff --git a/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs b/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs index 5d324576de..2a81c3924f 100644 --- a/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs @@ -57,10 +57,6 @@ ifeq ($(CONFIG_STACK_CANARIES),y) ARCHOPTIMIZATION += -fstack-protector-all endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs b/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs index 4e006e736d..a5e40bc600 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs @@ -57,10 +57,6 @@ ifeq ($(CONFIG_STACK_CANARIES),y) ARCHOPTIMIZATION += -fstack-protector-all endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic diff --git a/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs b/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs index 3e636aecc6..9392e6fa9f 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs @@ -57,10 +57,6 @@ ifeq ($(CONFIG_STACK_CANARIES),y) ARCHOPTIMIZATION += -fstack-protector-all endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs b/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs index 7d19c00574..f0dd050f92 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs +++ b/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs @@ -57,10 +57,6 @@ ifeq ($(CONFIG_STACK_CANARIES),y) ARCHOPTIMIZATION += -fstack-protector-all endif -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic diff --git a/boards/xtensa/esp32s2/esp32s2-saola-1/scripts/Make.defs b/boards/xtensa/esp32s2/esp32s2-saola-1/scripts/Make.defs index 13c08a47f3..250960ef20 100644 --- a/boards/xtensa/esp32s2/esp32s2-saola-1/scripts/Make.defs +++ b/boards/xtensa/esp32s2/esp32s2-saola-1/scripts/Make.defs @@ -38,10 +38,6 @@ endif ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_rom.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_peripherals.ld -ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -endif - ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef ARCHWARNINGSXX = -Wall -Wshadow -Wundef ARCHPICFLAGS = -fpic diff --git a/boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs b/boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs index b53941c826..10c8510543 100644 --- a/boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs +++ b/boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs @@ -29,7 +29,7 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom.ld ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld ifneq ($(CONFIG_DEBUG_NOOPT),y) - ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce + ARCHOPTIMIZATION += -fno-strength-reduce endif ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow -Wundef