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/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 933e066118 common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64
933e066118 is described below
commit 933e0661188d304bf68fde4f6552c93f9ae7931b
Author: wangyongrong <[email protected]>
AuthorDate: Fri Apr 12 12:42:25 2024 +0800
common/Toolchain.defs: support CONFIG_DEBUG_NOOPT for x86_64
Signed-off-by: wangyongrong <[email protected]>
---
arch/x86_64/src/common/Toolchain.defs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86_64/src/common/Toolchain.defs
b/arch/x86_64/src/common/Toolchain.defs
index 9cc456593e..fb4b4a93d3 100644
--- a/arch/x86_64/src/common/Toolchain.defs
+++ b/arch/x86_64/src/common/Toolchain.defs
@@ -41,7 +41,9 @@ ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
ARCHOPTIMIZATION = $(CONFIG_DEBUG_SYMBOLS_LEVEL)
endif
-ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
+ifeq ($(CONFIG_DEBUG_NOOPT),y)
+ ARCHOPTIMIZATION += -O0
+else ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
ARCHOPTIMIZATION += -Os