pkarashchenko commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861635091
##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
# Optimization of unused sections
+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
Review Comment:
Please move this before the comment above
##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
# Optimization of unused sections
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
Review Comment:
there is `ifeq ($(CONFIG_DEBUG_NOOPT),y)` at line 45. Please merge with that
selection.
Or maybe you can add `CONFIG_DEBUG_CUSTOMOPT` and make it the same way as in
other files
##########
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)
Review Comment:
```suggestion
ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
```
##########
arch/sparc/src/sparc_v8/Toolchain.defs:
##########
@@ -56,19 +56,29 @@ else
$(error "No valid CONFIG_ARCH_CHIP_ set in the configuration")
endif
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+ ARCHOPTIMIZATION += -fno-strict-aliasing
+endif
+
+ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
+ ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
+else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
+ ARCHOPTIMIZATION += -O2
+endif
+
ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
- MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
+ ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
endif
Review Comment:
Duplicates above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]