You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/04/30 02:17:27 UTC

[incubator-nuttx] 01/02: risc-v/rv32im: Set MAXOPTIMIZATION regardless of any debug options

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit abf039b74491b62283b224b7caf397f8a68cc9e4
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Fri Apr 23 09:27:49 2021 -0300

    risc-v/rv32im: Set MAXOPTIMIZATION regardless of any debug options
---
 arch/risc-v/src/rv32im/Toolchain.defs | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/arch/risc-v/src/rv32im/Toolchain.defs b/arch/risc-v/src/rv32im/Toolchain.defs
index 2812256..4f88e09 100644
--- a/arch/risc-v/src/rv32im/Toolchain.defs
+++ b/arch/risc-v/src/rv32im/Toolchain.defs
@@ -49,6 +49,8 @@ endif
 
 ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
   MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
+else
+  MAXOPTIMIZATION ?= -Os
 endif
 
 # Generic GNU RVG toolchain
@@ -67,13 +69,6 @@ ifeq ($(CONFIG_RISCV_TOOLCHAIN),GNU_RVG)
   endif
 endif
 
-# Individual tools may limit the optimization level but, by default, the
-# optimization level will be set to -Os
-
-ifeq ($(CONFIG_DEBUG_SYMBOLS),)
-MAXOPTIMIZATION ?= -Os
-endif
-
 # Default toolchain
 
 CC = $(CROSSDEV)gcc