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 2d7c47ce16 greenhills: fix the build option warning
2d7c47ce16 is described below

commit 2d7c47ce16ce04a7e9f0d6a70b87d95dd9fedd96
Author: guoshichao <[email protected]>
AuthorDate: Tue Jul 23 20:38:27 2024 +0800

    greenhills: fix the build option warning
    
    Warning: Unknown option "-fno-optimize-sibling-calls" ignored.  Did you 
mean "-mno-long-calls"?
    
    Signed-off-by: guoshichao <[email protected]>
---
 arch/arm/src/common/Toolchain.defs | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/common/Toolchain.defs 
b/arch/arm/src/common/Toolchain.defs
index 73a43d01f6..d77c286b4b 100644
--- a/arch/arm/src/common/Toolchain.defs
+++ b/arch/arm/src/common/Toolchain.defs
@@ -45,7 +45,11 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
 endif
 
 ifeq ($(CONFIG_FRAME_POINTER),y)
-  ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+  ifeq ($(CONFIG_ARCH_TOOLCHAIN_GHS),y)
+    ARCHOPTIMIZATION += -ga
+  else
+    ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+  endif
 else
   ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
     ARCHOPTIMIZATION += -noga
@@ -101,7 +105,11 @@ ifeq ($(CONFIG_ARCH_INSTRUMENT_ALL),y)
 endif
 
 ifeq ($(CONFIG_UNWINDER_ARM),y)
-  ARCHOPTIMIZATION += -funwind-tables -fasynchronous-unwind-tables
+  ifeq ($(CONFIG_ARCH_TOOLCHAIN_GHS),y)
+    ARCHOPTIMIZATION += -gtws
+  else
+    ARCHOPTIMIZATION += -funwind-tables -fasynchronous-unwind-tables
+  endif
 endif
 
 # Link Time Optimization

Reply via email to