summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/avr/src/avr32/Toolchain.defs1
-rw-r--r--nuttx/configs/avr32dev1/nsh/Make.defs8
-rw-r--r--nuttx/configs/avr32dev1/ostest/Make.defs9
-rw-r--r--nuttx/configs/c5471evm/httpd/Make.defs8
-rw-r--r--nuttx/configs/c5471evm/nettest/Make.defs8
-rw-r--r--nuttx/configs/c5471evm/nsh/Make.defs8
-rw-r--r--nuttx/configs/c5471evm/ostest/Make.defs8
-rw-r--r--nuttx/configs/compal_e86/nsh_highram/Make.defs10
-rw-r--r--nuttx/configs/compal_e88/nsh_highram/Make.defs8
-rw-r--r--nuttx/configs/compal_e99/nsh_compalram/Make.defs8
-rw-r--r--nuttx/configs/compal_e99/nsh_highram/Make.defs8
-rw-r--r--nuttx/configs/m68332evb/Make.defs8
-rw-r--r--nuttx/configs/mx1ads/ostest/Make.defs8
-rw-r--r--nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs9
-rw-r--r--nuttx/configs/sim/configdata/Make.defs6
-rw-r--r--nuttx/configs/sim/cxxtest/Make.defs6
-rw-r--r--nuttx/configs/sim/mount/Make.defs6
-rw-r--r--nuttx/configs/sim/mtdpart/Make.defs6
-rw-r--r--nuttx/configs/sim/nettest/Make.defs6
-rw-r--r--nuttx/configs/sim/nsh/Make.defs6
-rw-r--r--nuttx/configs/sim/nsh2/Make.defs6
-rw-r--r--nuttx/configs/sim/nx/Make.defs6
-rw-r--r--nuttx/configs/sim/nx11/Make.defs6
-rw-r--r--nuttx/configs/sim/nxffs/Make.defs6
-rw-r--r--nuttx/configs/sim/nxlines/Make.defs8
-rw-r--r--nuttx/configs/sim/nxwm/Make.defs6
-rw-r--r--nuttx/configs/sim/ostest/Make.defs8
-rw-r--r--nuttx/configs/sim/pashello/Make.defs6
-rw-r--r--nuttx/configs/sim/touchscreen/Make.defs6
-rw-r--r--nuttx/configs/skp16c26/ostest/Make.defs7
-rw-r--r--nuttx/configs/us7032evb1/nsh/Make.defs7
-rw-r--r--nuttx/configs/us7032evb1/ostest/Make.defs7
32 files changed, 141 insertions, 83 deletions
diff --git a/nuttx/arch/avr/src/avr32/Toolchain.defs b/nuttx/arch/avr/src/avr32/Toolchain.defs
index b45abadc1..9c3bed04c 100644
--- a/nuttx/arch/avr/src/avr32/Toolchain.defs
+++ b/nuttx/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/nuttx/configs/avr32dev1/nsh/Make.defs b/nuttx/configs/avr32dev1/nsh/Make.defs
index 85705a297..57a488187 100644
--- a/nuttx/configs/avr32dev1/nsh/Make.defs
+++ b/nuttx/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/nuttx/configs/avr32dev1/ostest/Make.defs b/nuttx/configs/avr32dev1/ostest/Make.defs
index 8dc6b8f40..08e49ef8c 100644
--- a/nuttx/configs/avr32dev1/ostest/Make.defs
+++ b/nuttx/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/nuttx/configs/c5471evm/httpd/Make.defs b/nuttx/configs/c5471evm/httpd/Make.defs
index d06299359..8b4180759 100644
--- a/nuttx/configs/c5471evm/httpd/Make.defs
+++ b/nuttx/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/nuttx/configs/c5471evm/nettest/Make.defs b/nuttx/configs/c5471evm/nettest/Make.defs
index bd7dcf80c..9da280aa9 100644
--- a/nuttx/configs/c5471evm/nettest/Make.defs
+++ b/nuttx/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/nuttx/configs/c5471evm/nsh/Make.defs b/nuttx/configs/c5471evm/nsh/Make.defs
index 5feb14400..b8b3c2c9e 100644
--- a/nuttx/configs/c5471evm/nsh/Make.defs
+++ b/nuttx/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/nuttx/configs/c5471evm/ostest/Make.defs b/nuttx/configs/c5471evm/ostest/Make.defs
index b683df3ec..3d58b9f3a 100644
--- a/nuttx/configs/c5471evm/ostest/Make.defs
+++ b/nuttx/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/nuttx/configs/compal_e86/nsh_highram/Make.defs b/nuttx/configs/compal_e86/nsh_highram/Make.defs
index 0ed3d6cb4..6018a3811 100644
--- a/nuttx/configs/compal_e86/nsh_highram/Make.defs
+++ b/nuttx/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/nuttx/configs/compal_e88/nsh_highram/Make.defs b/nuttx/configs/compal_e88/nsh_highram/Make.defs
index a9454b0ec..43bd541db 100644
--- a/nuttx/configs/compal_e88/nsh_highram/Make.defs
+++ b/nuttx/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/nuttx/configs/compal_e99/nsh_compalram/Make.defs b/nuttx/configs/compal_e99/nsh_compalram/Make.defs
index 61f5a5f6e..db0d20465 100644
--- a/nuttx/configs/compal_e99/nsh_compalram/Make.defs
+++ b/nuttx/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/nuttx/configs/compal_e99/nsh_highram/Make.defs b/nuttx/configs/compal_e99/nsh_highram/Make.defs
index a9454b0ec..43bd541db 100644
--- a/nuttx/configs/compal_e99/nsh_highram/Make.defs
+++ b/nuttx/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/nuttx/configs/m68332evb/Make.defs b/nuttx/configs/m68332evb/Make.defs
index 28b7f73a0..36ba3b597 100644
--- a/nuttx/configs/m68332evb/Make.defs
+++ b/nuttx/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/nuttx/configs/mx1ads/ostest/Make.defs b/nuttx/configs/mx1ads/ostest/Make.defs
index 0e261775f..ca18e4009 100644
--- a/nuttx/configs/mx1ads/ostest/Make.defs
+++ b/nuttx/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/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs b/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs
index 59b21efff..f66fef0a8 100644
--- a/nuttx/configs/pirelli_dpl10/nsh_highram/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/configdata/Make.defs b/nuttx/configs/sim/configdata/Make.defs
index 99712bebe..102620785 100644
--- a/nuttx/configs/sim/configdata/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/cxxtest/Make.defs b/nuttx/configs/sim/cxxtest/Make.defs
index 9c7c3d46b..6ef9cb83f 100644
--- a/nuttx/configs/sim/cxxtest/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/mount/Make.defs b/nuttx/configs/sim/mount/Make.defs
index 54adfdbc4..833596b31 100644
--- a/nuttx/configs/sim/mount/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/mtdpart/Make.defs b/nuttx/configs/sim/mtdpart/Make.defs
index 31f89a7fe..1a142f35a 100644
--- a/nuttx/configs/sim/mtdpart/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nettest/Make.defs b/nuttx/configs/sim/nettest/Make.defs
index 0851bcc77..ff645f3cb 100644
--- a/nuttx/configs/sim/nettest/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nsh/Make.defs b/nuttx/configs/sim/nsh/Make.defs
index e08318808..52c70c420 100644
--- a/nuttx/configs/sim/nsh/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nsh2/Make.defs b/nuttx/configs/sim/nsh2/Make.defs
index a8bfaf254..48ac1f106 100644
--- a/nuttx/configs/sim/nsh2/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nx/Make.defs b/nuttx/configs/sim/nx/Make.defs
index 924ac90bf..1d2cd7f69 100644
--- a/nuttx/configs/sim/nx/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nx11/Make.defs b/nuttx/configs/sim/nx11/Make.defs
index e78a3a636..000f56ce8 100644
--- a/nuttx/configs/sim/nx11/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nxffs/Make.defs b/nuttx/configs/sim/nxffs/Make.defs
index 10b5012ea..90e9dc9fc 100644
--- a/nuttx/configs/sim/nxffs/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nxlines/Make.defs b/nuttx/configs/sim/nxlines/Make.defs
index 18c8bf537..c391850b4 100644
--- a/nuttx/configs/sim/nxlines/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/nxwm/Make.defs b/nuttx/configs/sim/nxwm/Make.defs
index b5b2e389c..2840cf189 100644
--- a/nuttx/configs/sim/nxwm/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/ostest/Make.defs b/nuttx/configs/sim/ostest/Make.defs
index 975d59338..ce3b24ae6 100644
--- a/nuttx/configs/sim/ostest/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/pashello/Make.defs b/nuttx/configs/sim/pashello/Make.defs
index 553026914..3ce6b9406 100644
--- a/nuttx/configs/sim/pashello/Make.defs
+++ b/nuttx/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/nuttx/configs/sim/touchscreen/Make.defs b/nuttx/configs/sim/touchscreen/Make.defs
index 05d223099..29090dda8 100644
--- a/nuttx/configs/sim/touchscreen/Make.defs
+++ b/nuttx/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/nuttx/configs/skp16c26/ostest/Make.defs b/nuttx/configs/skp16c26/ostest/Make.defs
index 7f1ab651a..880134c38 100644
--- a/nuttx/configs/skp16c26/ostest/Make.defs
+++ b/nuttx/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/nuttx/configs/us7032evb1/nsh/Make.defs b/nuttx/configs/us7032evb1/nsh/Make.defs
index 595bcf4fd..c6de059e2 100644
--- a/nuttx/configs/us7032evb1/nsh/Make.defs
+++ b/nuttx/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/nuttx/configs/us7032evb1/ostest/Make.defs b/nuttx/configs/us7032evb1/ostest/Make.defs
index 6fe463388..a77f3a6ac 100644
--- a/nuttx/configs/us7032evb1/ostest/Make.defs
+++ b/nuttx/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