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



##########
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:
       Instead of adding it in tools/Config.mk, I think a better spot might be 
`arch/common/src/Makefile`. This would create a spot for common code in 
arch/*/src/Makefile




-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to