xiaoxiang781216 commented on code in PR #3884:
URL: https://github.com/apache/nuttx-apps/pull/3884#discussion_r4327524081


##########
Make.defs:
##########
@@ -72,6 +72,21 @@ BINDIR_DEBUG ?= $(APPDIR)$(DELIM)bin_debug
 
 BUILD_SHARED_LIBRARY ?= $(APPDIR)$(DELIM)Library.mk
 
+# With CONFIG_LTO_FULL the gcc driver links a module.  A partial link (-r)
+# must compile the LTO objects to machine code, with the module options
+# (-mthumb, -mlong-calls, ...): the loader cannot use LTO data.
+
+ifneq ($(filter %gcc,$(firstword $(MODULELD))),)
+  ifneq ($(filter -r,$(LDMODULEFLAGS)),)
+    LDMODULEFLAGS += -flinker-output=nolto-rel \

Review Comment:
   let's fix the initialization of LDMODULEFLAGS in nuttx side directly



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