xiaoxiang781216 commented on code in PR #20846: URL: https://github.com/apache/nuttx/pull/20846#discussion_r4332578789
########## 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: why not fix the prototype direcctly instead adding `-Wno-error` ########## 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: why not add to gcc branch directly instead checking it 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
