From f5c77933cbf428a423627995a133c6e036858e67 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Nihei Date: Tue, 1 Nov 2022 17:12:15 -0300 Subject: [PATCH] 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 --- 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