pkarashchenko commented on a change in pull request #5496:
URL: https://github.com/apache/incubator-nuttx/pull/5496#discussion_r806762787



##########
File path: tools/Config.mk
##########
@@ -548,3 +548,17 @@ else
   ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" 
$(TOPDIR)$(DELIM)include$(DELIM)cxx}
 endif
 ARCHXXINCLUDES += ${shell $(INCDIR) -s "$(CC)" $(TOPDIR)$(DELIM)include}
+
+# Linker Scripts
+
+# Note: This file has the potenital to be included multiple times. To prevent 
duplicate linker scripts
+# from being added, guard the `LDFLAGS +=` with $(ARCHSCRIPT_ALREADY_ADDED)
+
+ifeq ($(ARCHSCRIPT_ALREADY_ADDED),)
+  ifeq ($(CONFIG_CYGWIN_WINTOOL),y)
+    LDFLAGS += $(addprefix -T,$(foreach SCRIPT,$(ARCHSCRIPT),${shell cygpath 
-w $(SCRIPT)}))
+  else
+    LDFLAGS += $(addprefix -T,$(ARCHSCRIPT))
+  endif
+  ARCHSCRIPT_ALREADY_ADDED = y
+endif

Review comment:
       Do we know the reason why linker scripts are added multiple times? Is 
this consistent on both native Linux and Cygwin?




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