casaroli commented on code in PR #20846:
URL: https://github.com/apache/nuttx/pull/20846#discussion_r4334281534


##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -734,6 +734,20 @@ ifneq ($(CONFIG_BUILD_KERNEL),y)
   LDELFFLAGS += $(TOPDIR)$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)crt0.o
 endif
 
+# With CONFIG_LTO_FULL gcc links a module.  A partial link must compile the
+# LTO objects to machine code with the module options, as the loader cannot
+# use LTO data.  -Wno-error: LTO warns that crt0 and the program declare

Review Comment:
   Done.



##########
arch/arm/src/common/Toolchain.defs:
##########
@@ -734,6 +734,20 @@ ifneq ($(CONFIG_BUILD_KERNEL),y)
   LDELFFLAGS += $(TOPDIR)$(DELIM)arch$(DELIM)arm$(DELIM)src$(DELIM)crt0.o
 endif
 
+# With CONFIG_LTO_FULL gcc links a module.  A partial link must compile the
+# LTO objects to machine code with the module options, as the loader cannot
+# use LTO data.  -Wno-error: LTO warns that crt0 and the program declare
+# main() differently.
+
+ifneq ($(filter %gcc,$(firstword $(MODULELD))),)

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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to