diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile index 61846b2464..f265b8eb60 100644 --- a/arch/arm/src/Makefile +++ b/arch/arm/src/Makefile @@ -168,7 +168,7 @@ ifneq ($(CONFIG_ALLSYMS),y) $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) else $(Q) # Link and generate default table - $(Q) $(call LINK_ALLSYMS, $^) + $(Q) $(if $(wildcard $(shell echo $(NUTTX))),,$(call LINK_ALLSYMS,$^)) $(Q) # Extract all symbols $(Q) $(call LINK_ALLSYMS, $^) $(Q) # Extract again since the table offset may changed diff --git a/arch/risc-v/src/Makefile b/arch/risc-v/src/Makefile index 46e4fcedaf..a6add5f590 100644 --- a/arch/risc-v/src/Makefile +++ b/arch/risc-v/src/Makefile @@ -170,7 +170,7 @@ ifneq ($(CONFIG_ALLSYMS),y) $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) else $(Q) # Link and generate default table - $(Q) $(call LINK_ALLSYMS, $^) + $(Q) $(if $(wildcard $(shell echo $(NUTTX))),,$(call LINK_ALLSYMS,$^)) $(Q) # Extract all symbols $(Q) $(call LINK_ALLSYMS, $^) $(Q) # Extract again since the table offset may changed diff --git a/arch/xtensa/src/Makefile b/arch/xtensa/src/Makefile index bb673eb42f..71e5607834 100644 --- a/arch/xtensa/src/Makefile +++ b/arch/xtensa/src/Makefile @@ -122,7 +122,7 @@ ifneq ($(CONFIG_ALLSYMS),y) $(LDSTARTGROUP) $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) else $(Q) # Link and generate default table - $(Q) $(call LINK_ALLSYMS, $^) + $(Q) $(if $(wildcard $(shell echo $(NUTTX))),,$(call LINK_ALLSYMS,$^)) $(Q) # Extract all symbols $(Q) $(call LINK_ALLSYMS, $^) $(Q) # Extract again since the table offset may changed