From ff96d6158e93fbaba54084b536ca0433a6066370 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 21 Jul 2023 16:20:22 +0000 Subject: [PATCH] genprotimg/boot: avoid the deletion of .lds files by using .SECONDARY MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid the deletion of the intermediate `(stage3a|stage3b|stage3b_reloc).lds` files by adding them to the special built-in target `.SECONDARY` as prerequisites. This way they're declared as intermediate files that should never be deleted automatically. [1] [1] https://www.gnu.org/software/make/manual/html_node/Special-Targets.html#index-preserving-with-_002eSECONDARY Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- genprotimg/boot/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/genprotimg/boot/Makefile b/genprotimg/boot/Makefile index 82b3a63b..c9ba5b38 100644 --- a/genprotimg/boot/Makefile +++ b/genprotimg/boot/Makefile @@ -72,6 +72,7 @@ stage3b_reloc.o: stage3b.bin stage3a.elf: head.o stage3a_init.o $(ZIPL_OBJS) stage3b.elf: head.o $(ZIPL_OBJS) +.SECONDARY: $(FILES:.bin=.lds) %.elf: %.lds %.o $(LINK) $(NO_PIE_LDFLAGS) $(NO_WARN_RWX_SEGMENTS_LDFLAGS) -Wl,-T,$< -Wl,--build-id=none -m64 -static -nostdlib $(filter %.o, $^) -o $@ @chmod a-x $@