anchao commented on code in PR #12884:
URL: https://github.com/apache/nuttx/pull/12884#discussion_r1713093078


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -292,8 +320,13 @@ endif
 
 # Architecture flags
 
-ARCHCFLAGS += -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas
-ARCHCXXFLAGS += -Wno-attributes -Wno-unknown-pragmas
+ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+  ARCHCFLAGS += -gcc -gnu99 -preprocess_assembly_files 
--diag_suppress=68,111,174,222,236,257,826,1143,1721
+  ARCHCXXFLAGS += --gnu_asm --diag_suppress=540,826

Review Comment:
   Add some comments to describe the meaning of diag_suppress numbers, you 
could refer:
   
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs#L107-L125



##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -47,7 +47,11 @@ endif
 ifeq ($(CONFIG_FRAME_POINTER),y)
   ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
 else
-  ARCHOPTIMIZATION += -fomit-frame-pointer
+  ifeq ($(CONFIG_ARM_TOOLCHAIN_GHS),y)
+    ARCHOPTIMIZATION += -noga

Review Comment:
   Seriously I don't like adding too many special compiler assertions to the 
common toolchain. For tricore architecture, GNUC/TASKING is separated into two 
files, because most of the compilation options are completely different:
   
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainTasking.defs
   
https://github.com/apache/nuttx/blob/master/arch/tricore/src/common/ToolchainGnuc.defs
   



-- 
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]

Reply via email to