xiaoxiang781216 commented on a change in pull request #5282:
URL: https://github.com/apache/incubator-nuttx/pull/5282#discussion_r788777548



##########
File path: boards/risc-v/bl602/bl602evb/scripts/Make.defs
##########
@@ -45,8 +45,8 @@ ifneq ($(CONFIG_DEBUG_NOOPT),y)
 endif
 
 ARCHCPUFLAGS += -mno-relax
-ARCHCFLAGS = -fno-builtin -ffunction-sections -fdata-sections 
-fstrict-volatile-bitfields -fshort-enums -fno-omit-frame-pointer
-ARCHCXXFLAGS = -fno-builtin -ffunction-sections -fdata-sections 
-fstrict-volatile-bitfields -fshort-enums -fno-omit-frame-pointer 
-fno-exceptions -fcheck-new -std=c++17 -D__NuttX__ -pipe -nostdinc++
+ARCHCFLAGS = -fno-builtin -ffunction-sections -fdata-sections

Review comment:
       > General question on `-fshort-enums`. Shouldn't this give better code 
size? 
   
   Since the prebuilt library(e.g. libgcc, libm, libsupc++) from toolchain 
never add -fshort-enums, it's wrong to enable this option unless we build the 
toolchain by self: https://oroboro.com/short-enum/
   
   > Do we have a Kconfig options to specify extra options like this? It might 
be needed if code is linked to third party pre-compiled libraries that are 
compiled with `-fshort-enums` and have pointers to enums or arrays of enums 
passed as parameters to functions.
   
   No. 
   




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