OSDN Git Service

unicore32: simplify linker script generation for decompressor
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 8 Mar 2019 05:30:35 +0000 (14:30 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 13 Mar 2019 17:39:11 +0000 (02:39 +0900)
When I was searching for unneeded $(KCONFIG_CONFIG) usages, I noticed
this strange build dependency.

It can use $(call if_changed,...) in case ZTEXTADDR and ZBSSADDR are
changed, but even a simpler way is to use the pattern rule in
scripts/Makefile.build. This is what arch/arm/boot/compressed/Makefile
does.

I did only build test. I confirmed equivalent vmlinux.lds was generated.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
arch/unicore32/boot/compressed/Makefile
arch/unicore32/boot/compressed/vmlinux.lds.S [moved from arch/unicore32/boot/compressed/vmlinux.lds.in with 100% similarity]

index 9aecdd3..150fafc 100644 (file)
@@ -61,7 +61,4 @@ $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/head.o $(obj)/piggy.o \
 ZTEXTADDR      := 0x03000000
 ZBSSADDR       := ALIGN(4)
 
-SEDFLAGS_lds   = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/
-$(obj)/vmlinux.lds: $(obj)/vmlinux.lds.in arch/unicore32/boot/Makefile $(KCONFIG_CONFIG)
-       @sed "$(SEDFLAGS_lds)" < $< > $@
-
+CPPFLAGS_vmlinux.lds = -DTEXT_START="$(ZTEXTADDR)" -DBSS_START="$(ZBSSADDR)"