pkarashchenko commented on code in PR #8903:
URL: https://github.com/apache/nuttx/pull/8903#discussion_r1148554255


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -267,6 +254,29 @@ endif
 
 ARCHOPTIMIZATION += -fno-common -Wall -Wshadow -Wundef
 
+ifeq ($(CONFIG_ARM_THUMB),y)
+  ARCHOPTIMIZATION += -mthumb
+
+  # Add assembler options only if GCC LTO is not enabled. Otherwise we get
+  # lto-wrapper: warning: Extra option to '-Xassembler': -mthumb, dropping
+  # all '-Xassembler' and '-Wa' options.
+
+  ifneq ($(LD),$(CC))

Review Comment:
   Need to find another solution as `ARCHOPTIMIZATION` is passed to both `CC` 
and `LD`, but `-Wa` should be filtered only for `LD`.



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to