You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/11/02 01:15:33 UTC

[incubator-nuttx] branch master updated: arch: Fix linking of multiple preprocessed linker script files

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new f5c77933cb arch: Fix linking of multiple preprocessed linker script files
f5c77933cb is described below

commit f5c77933cbf428a423627995a133c6e036858e67
Author: Gustavo Henrique Nihei <gu...@espressif.com>
AuthorDate: Tue Nov 1 17:12:15 2022 -0300

    arch: Fix linking of multiple preprocessed linker script files
    
    Only the last item from the ARCHSCRIPT list was being suffixed with
    ".tmp".
    
    Signed-off-by: Gustavo Henrique Nihei <gu...@espressif.com>
---
 arch/arm/src/Makefile    | 2 +-
 arch/risc-v/src/Makefile | 2 +-
 arch/xtensa/src/Makefile | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/Makefile b/arch/arm/src/Makefile
index 50c9232867..c8c7de57c1 100644
--- a/arch/arm/src/Makefile
+++ b/arch/arm/src/Makefile
@@ -110,7 +110,7 @@ endif
 
 
 ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix $(SCRIPT_OPT),$(ARCHSCRIPT).tmp) $(EXTRALINKCMDS)
+LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
 LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)staging)
 
 BOARDMAKE = $(if $(wildcard board$(DELIM)Makefile),y,)
diff --git a/arch/risc-v/src/Makefile b/arch/risc-v/src/Makefile
index 59729ef26b..76c79feb32 100644
--- a/arch/risc-v/src/Makefile
+++ b/arch/risc-v/src/Makefile
@@ -80,7 +80,7 @@ KBIN = libkarch$(LIBEXT)
 BIN  = libarch$(LIBEXT)
 
 ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix -T,$(ARCHSCRIPT).tmp) $(EXTRALINKCMDS)
+LDFLAGS += $(addprefix -T,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
 
 ifeq ($(LD),$(CC))
   LDSTARTGROUP ?= -Wl,--start-group
diff --git a/arch/xtensa/src/Makefile b/arch/xtensa/src/Makefile
index 2bcef5e032..04d891dbf1 100644
--- a/arch/xtensa/src/Makefile
+++ b/arch/xtensa/src/Makefile
@@ -81,7 +81,7 @@ BIN  = libarch$(LIBEXT)
 # Override in Make.defs if linker is not 'ld'
 
 ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
-LDFLAGS += $(addprefix -T,$(ARCHSCRIPT).tmp) $(EXTRALINKCMDS)
+LDFLAGS += $(addprefix -T,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
 
 ifeq ($(LD),$(CC))
   LDSTARTGROUP ?= -Wl,--start-group