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