提交 3cbadd20 编写于 作者: M Masahiro Yamada 提交者: Helge Deller

parisc: decompressor: do not copy source files while building

As commit 7ae4a78d ("ARM: 8969/1: decompressor: simplify libfdt
builds") stated, copying source files during the build time may not
end up with as clean code as expected.

Do similar for parisc to clean up the Makefile.
Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
Acked-by: NHelge Deller <deller@gmx.de>
Signed-off-by: NHelge Deller <deller@gmx.de>
上级 c9e6606c
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
firmware.c
real2.S
sizes.h sizes.h
vmlinux vmlinux
vmlinux.lds vmlinux.lds
...@@ -13,7 +13,6 @@ OBJECTS := head.o real2.o firmware.o misc.o piggy.o ...@@ -13,7 +13,6 @@ OBJECTS := head.o real2.o firmware.o misc.o piggy.o
targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 targets := vmlinux.lds vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2
targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4 targets += vmlinux.bin.xz vmlinux.bin.lzma vmlinux.bin.lzo vmlinux.bin.lz4
targets += $(OBJECTS) sizes.h targets += $(OBJECTS) sizes.h
targets += real2.S firmware.c
KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER KBUILD_CFLAGS := -D__KERNEL__ -O2 -DBOOTLOADER
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
...@@ -42,14 +41,7 @@ $(obj)/head.o: $(obj)/sizes.h ...@@ -42,14 +41,7 @@ $(obj)/head.o: $(obj)/sizes.h
CFLAGS_misc.o += -I$(objtree)/$(obj) CFLAGS_misc.o += -I$(objtree)/$(obj)
$(obj)/misc.o: $(obj)/sizes.h $(obj)/misc.o: $(obj)/sizes.h
$(obj)/firmware.o: $(obj)/firmware.c
$(obj)/firmware.c: $(srctree)/arch/$(SRCARCH)/kernel/firmware.c
$(call cmd,shipped)
AFLAGS_real2.o += -DBOOTLOADER AFLAGS_real2.o += -DBOOTLOADER
$(obj)/real2.o: $(obj)/real2.S
$(obj)/real2.S: $(srctree)/arch/$(SRCARCH)/kernel/real2.S
$(call cmd,shipped)
CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER CPPFLAGS_vmlinux.lds += -I$(objtree)/$(obj) -DBOOTLOADER
$(obj)/vmlinux.lds: $(obj)/sizes.h $(obj)/vmlinux.lds: $(obj)/sizes.h
......
// SPDX-License-Identifier: GPL-2.0-only
#include "../../kernel/firmware.c"
/* SPDX-License-Identifier: GPL-2.0-only */
#include "../../kernel/real2.S"
...@@ -33,4 +33,9 @@ if [ -n "${building_out_of_srctree}" ]; then ...@@ -33,4 +33,9 @@ if [ -n "${building_out_of_srctree}" ]; then
do do
rm -f arch/mips/boot/compressed/${f} rm -f arch/mips/boot/compressed/${f}
done done
for f in firmware.c real2.S
do
rm -f arch/parisc/boot/compressed/${f}
done
fi fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册