You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/04/26 20:12:18 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request, #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

xiaoxiang781216 opened a new pull request, #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155

   ## Summary
   and migrate MAXOPTIMIZATION into ARCHOPTIMIZATION
   
   ## Impact
   Code refactor
   
   ## Testing
   Pass CI
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] zouboan commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
zouboan commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146819240

   @xiaoxiang781216 This is a broken commit, my custom boards can't working properly after i merged with master branch. I'm revert by dichotomy, and finally positioned on this commit.
   i delete the following code
   ifneq ($(CONFIG_DEBUG_NOOPT),y)
     ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing
   endif
   
   in my custom boards Make.defs, but the problem remains


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861655079


##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
 
 # Optimization of unused sections
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+  ARCHOPTIMIZATION += -fno-strict-aliasing
+endif
+
+ifeq ($(CONFIG_FRAME_POINTER),y)
+  ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+else
+  ARCHOPTIMIZATION += -fomit-frame-pointer
+endif

Review Comment:
   Done.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146849296

   The setting come from:
   https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/armv7-m/Toolchain.defs#L60-L68
   Please ensure you use `ARCHOPTIMIZATION +=` instead of `ARCHOPTIMIZATION =` in your Make.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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1114151541

   ping @pkarashchenko 


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] zouboan commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
zouboan commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146845106

   @xiaoxiang781216 
   before this commit:
   
   CC:  irq/irq_attach.c
   arm-none-eabi-gcc -c -fno-common -fno-builtin -ffunction-sections -fdata-sections -funwind-tables -Wall -Wstrict-prototypes -Wshadow -Wundef -g -Os -fomit-frame-pointer -ffunction-sections -fdata-sections -g -fno-strict-aliasing -march=armv7e-m -mtune=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -isystem "/home/zouboan/G/NuttX/nuttx/include" -D__NuttX__ -DNDEBUG -D__KERNEL__  -pipe -I "/home/zouboan/G/NuttX/nuttx/sched"   irq/irq_attach.c -o  irq_attach.o
   
   after this commit:
   
   CC:  group/group_find.c
   arm-none-eabi-gcc -c -fno-common -fno-builtin -ffunction-sections -fdata-sections -funwind-tables -Wall -Wstrict-prototypes -Wshadow -Wundef -g  -fno-strict-aliasing -march=armv7e-m -mtune=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -isystem "/home/zouboan/G/NuttX/nuttx/include" -D__NuttX__ -DNDEBUG -D__KERNEL__  -pipe -I "/home/zouboan/G/NuttX/nuttx/sched"   group/group_find.c -o  group_find.o
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] zouboan commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
zouboan commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146926528

   @xiaoxiang781216 Thanks for your help, there's a ARCHOPTIMIZATION = -g in my Make.defs , and the problem has been solved now.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146843490

   @zouboan could you run "make V=1" and compare the command line difference between the bad output and the good one?


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861665434


##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
 
 # Optimization of unused sections
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)

Review Comment:
   Done.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko merged pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861525558


##########
boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs:
##########
@@ -28,10 +28,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3.ld
 ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom.ld
 ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld
 
-ifneq ($(CONFIG_DEBUG_NOOPT),y)
-  ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce

Review Comment:
   Restored.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861635091


##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
 
 # Optimization of unused sections
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+  ARCHOPTIMIZATION += -fno-strict-aliasing
+endif
+
+ifeq ($(CONFIG_FRAME_POINTER),y)
+  ARCHOPTIMIZATION += -fno-omit-frame-pointer -fno-optimize-sibling-calls
+else
+  ARCHOPTIMIZATION += -fomit-frame-pointer
+endif

Review Comment:
   Please move this before the comment above



##########
arch/z80/src/ez80/Toolchain.defs:
##########
@@ -66,9 +66,19 @@ ARCHASMWARNINGS = -W
 
 # Optimization of unused sections
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)

Review Comment:
   there is `ifeq ($(CONFIG_DEBUG_NOOPT),y)` at line 45. Please merge with that selection.
   Or maybe you can add `CONFIG_DEBUG_CUSTOMOPT` and make it the same way as in other files



##########
boards/sim/sim/sim/scripts/Make.defs:
##########
@@ -41,18 +41,18 @@ ARCHDEFINES += -U__NetBSD__ -U__linux__ -U__sun__ -U__unix__
 ARCHDEFINES += -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
 
 ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
-  ARCHOPTIMIZATION = -g
-  ARCHOPTIMIZATIONRUST = -g
+  ARCHOPTIMIZATION += -g
+  ARCHOPTIMIZATIONRUST += -g
 endif
 
 ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
-  MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
-else
-  MAXOPTIMIZATION ?= -O2
+  ARCHOPTIMIZATION :+= $(CONFIG_DEBUG_OPTLEVEL)

Review Comment:
   ```suggestion
     ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
   ```



##########
arch/sparc/src/sparc_v8/Toolchain.defs:
##########
@@ -56,19 +56,29 @@ else
   $(error "No valid CONFIG_ARCH_CHIP_ set in the configuration")
 endif
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+  ARCHOPTIMIZATION += -fno-strict-aliasing
+endif
+
+ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
+  ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
+else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
+  ARCHOPTIMIZATION += -O2
+endif
+
 ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
-  MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
+  ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
 endif

Review Comment:
   Duplicates above



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861667095


##########
arch/sparc/src/sparc_v8/Toolchain.defs:
##########
@@ -56,19 +56,29 @@ else
   $(error "No valid CONFIG_ARCH_CHIP_ set in the configuration")
 endif
 
+ifneq ($(CONFIG_DEBUG_NOOPT),y)
+  ARCHOPTIMIZATION += -fno-strict-aliasing
+endif
+
+ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
+  ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
+else ifeq ($(CONFIG_DEBUG_FULLOPT),y)
+  ARCHOPTIMIZATION += -O2
+endif
+
 ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
-  MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
+  ARCHOPTIMIZATION += $(CONFIG_DEBUG_OPTLEVEL)
 endif

Review Comment:
   Done.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146832393

   @zouboan So the code building is fine and the behavior of the board is changed? Or it is a build issue that you are reporting?
   If it is a build issue then maybe you can share some more details (base arch and base board that you used initially, Make.defs and maybe some parts of the Makefile), so we can identify the root cause. 


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] zouboan commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
zouboan commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1146836663

   @pkarashchenko the behavior of the board is changed, It seems that the board to run very slowly, It seems that the optimization doesn't work. my custom boards config as follow:
   #
   # Debug Options
   #
   CONFIG_NDEBUG=y
   # CONFIG_DEBUG_ALERT is not set
   # CONFIG_DEBUG_FEATURES is not set
   # CONFIG_DEBUG_TCBINFO is not set
   CONFIG_ARCH_HAVE_STACKCHECK=y
   CONFIG_STACK_COLORATION=y
   # CONFIG_STACK_CANARIES is not set
   CONFIG_ARCH_HAVE_HEAPCHECK=y
   # CONFIG_HEAP_COLORATION is not set
   CONFIG_DEBUG_SYMBOLS=y
   # CONFIG_FRAME_POINTER is not set
   CONFIG_ARCH_HAVE_CUSTOMOPT=y
   # CONFIG_DEBUG_NOOPT is not set
   # CONFIG_DEBUG_CUSTOMOPT is not set
   CONFIG_DEBUG_FULLOPT=y
   CONFIG_DEBUG_OPT_UNUSED_SECTIONS=y
   CONFIG_DEBUG_LINK_MAP=y


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r859479347


##########
arch/arm/src/arm/Toolchain.defs:
##########
@@ -51,20 +51,22 @@ endif
 #  CROSSDEV         The GNU toolchain triple (command prefix)
 #  ARCHCPUFLAGS     CPU-specific flags selecting the instruction set
 #                   FPU options, etc.
-#  MAXOPTIMIZATION  The maximum optimization level that results in
+#  ARCHOPTIMIZATION The maximum optimization level that results in

Review Comment:
   is it still the `The maximum optimization level`?



##########
Documentation/guides/cpp_cmake.rst:
##########
@@ -88,7 +88,7 @@ Creating the project
 
     include(cmake/stm32f4discovery.cmake)
 
-    set(AC_COMMON_FLAGS "${AC_COMMON_FLAGS} -Wall -Wshadow -Wundef -fno-strict-aliasing -Os")
+    set(AC_COMMON_FLAGS "${AC_COMMON_FLAGS} -Wall -Wshadow -Wundef -Os")

Review Comment:
   why removed from here?



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r859585667


##########
arch/arm/src/arm/Toolchain.defs:
##########
@@ -51,20 +51,22 @@ endif
 #  CROSSDEV         The GNU toolchain triple (command prefix)
 #  ARCHCPUFLAGS     CPU-specific flags selecting the instruction set
 #                   FPU options, etc.
-#  MAXOPTIMIZATION  The maximum optimization level that results in
+#  ARCHOPTIMIZATION The maximum optimization level that results in

Review Comment:
   Remove "maximum"



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r859583425


##########
Documentation/guides/cpp_cmake.rst:
##########
@@ -88,7 +88,7 @@ Creating the project
 
     include(cmake/stm32f4discovery.cmake)
 
-    set(AC_COMMON_FLAGS "${AC_COMMON_FLAGS} -Wall -Wshadow -Wundef -fno-strict-aliasing -Os")
+    set(AC_COMMON_FLAGS "${AC_COMMON_FLAGS} -Wall -Wshadow -Wundef -Os")

Review Comment:
   revert.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861502858


##########
arch/arm/src/arm/Toolchain.defs:
##########
@@ -51,20 +51,22 @@ endif
 #  CROSSDEV         The GNU toolchain triple (command prefix)
 #  ARCHCPUFLAGS     CPU-specific flags selecting the instruction set
 #                   FPU options, etc.
-#  MAXOPTIMIZATION  The maximum optimization level that results in
+#  ARCHOPTIMIZATION The optimization level that results in
 #                   reliable code generation.
 #
 
+ARCHOPTIMIZATION += -fno-strict-aliasing

Review Comment:
   I see that usage of `-fno-strict-aliasing` was guarded by `ifneq ($(CONFIG_DEBUG_NOOPT),y)` but now it is always set. Just want to confirm that this is "as expected".



##########
boards/xtensa/esp32s3/esp32s3-devkit/scripts/Make.defs:
##########
@@ -28,10 +28,6 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3.ld
 ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_rom.ld
 ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s3_peripherals.ld
 
-ifneq ($(CONFIG_DEBUG_NOOPT),y)
-  ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce

Review Comment:
   Why `-fno-strength-reduce` is removed?



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861525947


##########
arch/arm/src/arm/Toolchain.defs:
##########
@@ -51,20 +51,22 @@ endif
 #  CROSSDEV         The GNU toolchain triple (command prefix)
 #  ARCHCPUFLAGS     CPU-specific flags selecting the instruction set
 #                   FPU options, etc.
-#  MAXOPTIMIZATION  The maximum optimization level that results in
+#  ARCHOPTIMIZATION The optimization level that results in
 #                   reliable code generation.
 #
 
+ARCHOPTIMIZATION += -fno-strict-aliasing

Review Comment:
   Add the check back.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#discussion_r861650784


##########
boards/sim/sim/sim/scripts/Make.defs:
##########
@@ -41,18 +41,18 @@ ARCHDEFINES += -U__NetBSD__ -U__linux__ -U__sun__ -U__unix__
 ARCHDEFINES += -U__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
 
 ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
-  ARCHOPTIMIZATION = -g
-  ARCHOPTIMIZATIONRUST = -g
+  ARCHOPTIMIZATION += -g
+  ARCHOPTIMIZATIONRUST += -g
 endif
 
 ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y)
-  MAXOPTIMIZATION := $(CONFIG_DEBUG_OPTLEVEL)
-else
-  MAXOPTIMIZATION ?= -O2
+  ARCHOPTIMIZATION :+= $(CONFIG_DEBUG_OPTLEVEL)

Review Comment:
   Done.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #6155: boards: Move -fno-strict-aliasing from Make.defs to Toolchain.defs

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on PR #6155:
URL: https://github.com/apache/incubator-nuttx/pull/6155#issuecomment-1114159518

   > ping @pkarashchenko 
   
   PR had merge conflict, so I was not able to merge yesterday. I will merge as soon as CI finishes


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org