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


##########
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:
   Done in apache/nuttx#20846.



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