From a4e72dec0ef6f0923fc842d8fdf0871bf3407ccb Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 20 Dec 2013 12:36:02 -0600 Subject: [PATCH] More separation of debug symbols and optimization selections --- arch/avr/src/avr32/Toolchain.defs | 1 + configs/avr32dev1/nsh/Make.defs | 8 +++++--- configs/avr32dev1/ostest/Make.defs | 9 ++++++--- configs/c5471evm/httpd/Make.defs | 8 +++++--- configs/c5471evm/nettest/Make.defs | 8 +++++--- configs/c5471evm/nsh/Make.defs | 8 +++++--- configs/c5471evm/ostest/Make.defs | 8 +++++--- configs/compal_e86/nsh_highram/Make.defs | 10 ++++++---- configs/compal_e88/nsh_highram/Make.defs | 8 +++++--- configs/compal_e99/nsh_compalram/Make.defs | 8 +++++--- configs/compal_e99/nsh_highram/Make.defs | 8 +++++--- configs/m68332evb/Make.defs | 8 ++++---- configs/mx1ads/ostest/Make.defs | 8 +++++--- configs/pirelli_dpl10/nsh_highram/Make.defs | 9 +++++---- configs/sim/configdata/Make.defs | 6 ++++-- configs/sim/cxxtest/Make.defs | 6 ++++-- configs/sim/mount/Make.defs | 6 ++++-- configs/sim/mtdpart/Make.defs | 6 ++++-- configs/sim/nettest/Make.defs | 6 ++++-- configs/sim/nsh/Make.defs | 6 ++++-- configs/sim/nsh2/Make.defs | 6 ++++-- configs/sim/nx/Make.defs | 6 ++++-- configs/sim/nx11/Make.defs | 6 ++++-- configs/sim/nxffs/Make.defs | 6 ++++-- configs/sim/nxlines/Make.defs | 8 +++++--- configs/sim/nxwm/Make.defs | 6 ++++-- configs/sim/ostest/Make.defs | 8 +++++--- configs/sim/pashello/Make.defs | 6 ++++-- configs/sim/touchscreen/Make.defs | 6 ++++-- configs/skp16c26/ostest/Make.defs | 7 ++++--- configs/us7032evb1/nsh/Make.defs | 7 ++++--- configs/us7032evb1/ostest/Make.defs | 7 ++++--- 32 files changed, 141 insertions(+), 83 deletions(-) diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index b45abadc1c..9c3bed04cb 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -66,3 +66,4 @@ ifeq ($(CONFIG_AVR32_TOOLCHAIN),AVRTOOLSW) else # AVR Tools or avr32-toolchain from https://github.com/jsnyder/avr32-toolchain endif + diff --git a/configs/avr32dev1/nsh/Make.defs b/configs/avr32dev1/nsh/Make.defs index 85705a297b..57a4881871 100644 --- a/configs/avr32dev1/nsh/Make.defs +++ b/configs/avr32dev1/nsh/Make.defs @@ -66,9 +66,11 @@ ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gc ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -ffunction-sections -fdata-sections -fno-strict-aliasing + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -ffunction-sections -fdata-sections -fno-strict-aliasing endif ARCHCFLAGS = -fno-builtin -muse-rodata-section diff --git a/configs/avr32dev1/ostest/Make.defs b/configs/avr32dev1/ostest/Make.defs index 8dc6b8f40d..08e49ef8cf 100644 --- a/configs/avr32dev1/ostest/Make.defs +++ b/configs/avr32dev1/ostest/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/avr/src/avr32/Toolchain.defs # Setup for the selected toolchain @@ -79,9 +80,11 @@ ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gc ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -ffunction-sections -fdata-sections -fno-strict-aliasing + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -ffunction-sections -fdata-sections -fno-strict-aliasing endif ARCHCFLAGS = -fno-builtin -muse-rodata-section diff --git a/configs/c5471evm/httpd/Make.defs b/configs/c5471evm/httpd/Make.defs index d062993594..8b41807598 100644 --- a/configs/c5471evm/httpd/Make.defs +++ b/configs/c5471evm/httpd/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc @@ -50,9 +51,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/c5471evm/nettest/Make.defs b/configs/c5471evm/nettest/Make.defs index bd7dcf80c3..9da280aa90 100644 --- a/configs/c5471evm/nettest/Make.defs +++ b/configs/c5471evm/nettest/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc @@ -50,9 +51,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/c5471evm/nsh/Make.defs b/configs/c5471evm/nsh/Make.defs index 5feb144005..b8b3c2c9e4 100644 --- a/configs/c5471evm/nsh/Make.defs +++ b/configs/c5471evm/nsh/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc @@ -50,9 +51,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/c5471evm/ostest/Make.defs b/configs/c5471evm/ostest/Make.defs index b683df3ecd..3d58b9f3a2 100644 --- a/configs/c5471evm/ostest/Make.defs +++ b/configs/c5471evm/ostest/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc @@ -50,9 +51,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/compal_e86/nsh_highram/Make.defs b/configs/compal_e86/nsh_highram/Make.defs index 0ed3d6cb48..6018a3811c 100644 --- a/configs/compal_e86/nsh_highram/Make.defs +++ b/configs/compal_e86/nsh_highram/Make.defs @@ -87,10 +87,12 @@ 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} -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/compal_e88/nsh_highram/Make.defs b/configs/compal_e88/nsh_highram/Make.defs index a9454b0eca..43bd541db1 100644 --- a/configs/compal_e88/nsh_highram/Make.defs +++ b/configs/compal_e88/nsh_highram/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") OSMODIR = $(TOPDIR)/../../osmocom-bb @@ -59,9 +60,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/compal_e99/nsh_compalram/Make.defs b/configs/compal_e99/nsh_compalram/Make.defs index 61f5a5f6e4..db0d204651 100644 --- a/configs/compal_e99/nsh_compalram/Make.defs +++ b/configs/compal_e99/nsh_compalram/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") OSMODIR = $(TOPDIR)/../../osmocom-bb @@ -59,9 +60,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/compal_e99/nsh_highram/Make.defs b/configs/compal_e99/nsh_highram/Make.defs index a9454b0eca..43bd541db1 100644 --- a/configs/compal_e99/nsh_highram/Make.defs +++ b/configs/compal_e99/nsh_highram/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs ifeq ("${CONFIG_SERCOMM_CONSOLE}","y") OSMODIR = $(TOPDIR)/../../osmocom-bb @@ -59,9 +60,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/m68332evb/Make.defs b/configs/m68332evb/Make.defs index 28b7f73a0c..36ba3b5970 100644 --- a/configs/m68332evb/Make.defs +++ b/configs/m68332evb/Make.defs @@ -38,9 +38,10 @@ include ${TOPDIR}/tools/Config.mk ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ARCHCPUFLAGS = -m68332 -mcpu32 @@ -72,7 +73,6 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif - MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/configs/mx1ads/ostest/Make.defs b/configs/mx1ads/ostest/Make.defs index 0e261775f4..ca18e40094 100644 --- a/configs/mx1ads/ostest/Make.defs +++ b/configs/mx1ads/ostest/Make.defs @@ -35,6 +35,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc @@ -56,9 +57,10 @@ ARCHWARNINGSXX = -Wall -Wshadow ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/pirelli_dpl10/nsh_highram/Make.defs b/configs/pirelli_dpl10/nsh_highram/Make.defs index 59b21efff1..f66fef0a87 100644 --- a/configs/pirelli_dpl10/nsh_highram/Make.defs +++ b/configs/pirelli_dpl10/nsh_highram/Make.defs @@ -57,11 +57,12 @@ 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} -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) diff --git a/configs/sim/configdata/Make.defs b/configs/sim/configdata/Make.defs index 99712bebe1..1026207857 100644 --- a/configs/sim/configdata/Make.defs +++ b/configs/sim/configdata/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/cxxtest/Make.defs b/configs/sim/cxxtest/Make.defs index 9c7c3d46ba..6ef9cb83fb 100644 --- a/configs/sim/cxxtest/Make.defs +++ b/configs/sim/cxxtest/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/mount/Make.defs b/configs/sim/mount/Make.defs index 54adfdbc46..833596b314 100644 --- a/configs/sim/mount/Make.defs +++ b/configs/sim/mount/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/mtdpart/Make.defs b/configs/sim/mtdpart/Make.defs index 31f89a7fe6..1a142f35a7 100644 --- a/configs/sim/mtdpart/Make.defs +++ b/configs/sim/mtdpart/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nettest/Make.defs b/configs/sim/nettest/Make.defs index 0851bcc776..ff645f3cb8 100644 --- a/configs/sim/nettest/Make.defs +++ b/configs/sim/nettest/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nsh/Make.defs b/configs/sim/nsh/Make.defs index e08318808f..52c70c4207 100644 --- a/configs/sim/nsh/Make.defs +++ b/configs/sim/nsh/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nsh2/Make.defs b/configs/sim/nsh2/Make.defs index a8bfaf2542..48ac1f106d 100644 --- a/configs/sim/nsh2/Make.defs +++ b/configs/sim/nsh2/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nx/Make.defs b/configs/sim/nx/Make.defs index 924ac90bf0..1d2cd7f698 100644 --- a/configs/sim/nx/Make.defs +++ b/configs/sim/nx/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nx11/Make.defs b/configs/sim/nx11/Make.defs index e78a3a636e..000f56ce8c 100644 --- a/configs/sim/nx11/Make.defs +++ b/configs/sim/nx11/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nxffs/Make.defs b/configs/sim/nxffs/Make.defs index 10b5012ea7..90e9dc9fc4 100644 --- a/configs/sim/nxffs/Make.defs +++ b/configs/sim/nxffs/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nxlines/Make.defs b/configs/sim/nxlines/Make.defs index 18c8bf5375..c391850b4e 100644 --- a/configs/sim/nxlines/Make.defs +++ b/configs/sim/nxlines/Make.defs @@ -39,9 +39,11 @@ include ${TOPDIR}/tools/Config.mk HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/nxwm/Make.defs b/configs/sim/nxwm/Make.defs index b5b2e389c2..2840cf1899 100644 --- a/configs/sim/nxwm/Make.defs +++ b/configs/sim/nxwm/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/ostest/Make.defs b/configs/sim/ostest/Make.defs index 975d59338e..ce3b24ae65 100644 --- a/configs/sim/ostest/Make.defs +++ b/configs/sim/ostest/Make.defs @@ -39,9 +39,11 @@ include ${TOPDIR}/tools/Config.mk HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) - ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 + ARCHOPTIMIZATION = -g +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/pashello/Make.defs b/configs/sim/pashello/Make.defs index 553026914e..3ce6b94065 100644 --- a/configs/sim/pashello/Make.defs +++ b/configs/sim/pashello/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/sim/touchscreen/Make.defs b/configs/sim/touchscreen/Make.defs index 05d2230999..29090dda81 100644 --- a/configs/sim/touchscreen/Make.defs +++ b/configs/sim/touchscreen/Make.defs @@ -40,8 +40,10 @@ HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -O2 +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -O2 endif ARCHCPUFLAGS = -fno-builtin diff --git a/configs/skp16c26/ostest/Make.defs b/configs/skp16c26/ostest/Make.defs index 7f1ab651a9..880134c388 100644 --- a/configs/skp16c26/ostest/Make.defs +++ b/configs/skp16c26/ostest/Make.defs @@ -50,8 +50,10 @@ ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ARCHCPUFLAGS = -mcpu=m16c -fno-builtin @@ -74,7 +76,6 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif - MKDEP = $(TOPDIR)/tools/mkdeps.sh HOSTCC = gcc diff --git a/configs/us7032evb1/nsh/Make.defs b/configs/us7032evb1/nsh/Make.defs index 595bcf4fd6..c6de059e2e 100644 --- a/configs/us7032evb1/nsh/Make.defs +++ b/configs/us7032evb1/nsh/Make.defs @@ -38,9 +38,10 @@ include ${TOPDIR}/tools/Config.mk ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ARCHCPUFLAGS = -m1 -fno-builtin diff --git a/configs/us7032evb1/ostest/Make.defs b/configs/us7032evb1/ostest/Make.defs index 6fe4633889..a77f3a6ac2 100644 --- a/configs/us7032evb1/ostest/Make.defs +++ b/configs/us7032evb1/ostest/Make.defs @@ -38,9 +38,10 @@ include ${TOPDIR}/tools/Config.mk ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g -else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer +endif + +ifneq ($(CONFIG_DEBUG_NOOPT),y) + ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ARCHCPUFLAGS = -m1 -fno-builtin