Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 9154/1: decompressor: do not copy source files while building

As commit 7ae4a78daacf ("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 the other library files for further cleanups of the
Makefile and .gitignore.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

authored by

Masahiro Yamada and committed by
Russell King (Oracle)
251cc826 fa55b7dc

+17 -36
-5
arch/arm/boot/compressed/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - ashldi3.S 3 - bswapsdi2.S 4 - font.c 5 - lib1funcs.S 6 - hyp-stub.S 7 2 piggy_data 8 3 vmlinux 9 4 vmlinux.lds
+3 -30
arch/arm/boot/compressed/Makefile
··· 13 13 OBJS += debug.o 14 14 AFLAGS_head.o += -DDEBUG 15 15 endif 16 - FONTC = $(srctree)/lib/fonts/font_acorn_8x8.c 17 16 18 17 # string library code (-Os is enforced to keep it much smaller) 19 18 OBJS += string.o ··· 98 99 $(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector)) 99 100 100 101 targets := vmlinux vmlinux.lds piggy_data piggy.o \ 101 - lib1funcs.o ashldi3.o bswapsdi2.o \ 102 102 head.o $(OBJS) 103 - 104 - clean-files += lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S 105 103 106 104 KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING 107 105 ··· 130 134 # Next argument is a linker script 131 135 LDFLAGS_vmlinux += -T 132 136 133 - # For __aeabi_uidivmod 134 - lib1funcs = $(obj)/lib1funcs.o 135 - 136 - $(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S 137 - $(call cmd,shipped) 138 - 139 - # For __aeabi_llsl 140 - ashldi3 = $(obj)/ashldi3.o 141 - 142 - $(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S 143 - $(call cmd,shipped) 144 - 145 - # For __bswapsi2, __bswapdi2 146 - bswapsdi2 = $(obj)/bswapsdi2.o 147 - 148 - $(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S 149 - $(call cmd,shipped) 137 + OBJS += lib1funcs.o ashldi3.o bswapsdi2.o 150 138 151 139 # We need to prevent any GOTOFF relocs being used with references 152 140 # to symbols in the .bss section since we cannot relocate them ··· 155 175 efi-obj-$(CONFIG_EFI_STUB) := $(objtree)/drivers/firmware/efi/libstub/lib.a 156 176 157 177 $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \ 158 - $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \ 159 - $(bswapsdi2) $(efi-obj-y) FORCE 178 + $(addprefix $(obj)/, $(OBJS)) \ 179 + $(efi-obj-y) FORCE 160 180 @$(check_for_multiple_zreladdr) 161 181 $(call if_changed,ld) 162 182 @$(check_for_bad_syms) ··· 167 187 $(obj)/piggy.o: $(obj)/piggy_data 168 188 169 189 CFLAGS_font.o := -Dstatic= 170 - 171 - $(obj)/font.c: $(FONTC) 172 - $(call cmd,shipped) 173 - 174 190 AFLAGS_hyp-stub.o := -Wa,-march=armv7-a 175 - 176 - $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S 177 - $(call cmd,shipped)
+3
arch/arm/boot/compressed/ashldi3.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* For __aeabi_llsl */ 3 + #include "../../lib/ashldi3.S"
+3
arch/arm/boot/compressed/bswapsdi2.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* For __bswapsi2, __bswapdi2 */ 3 + #include "../../lib/bswapsdi2.S"
+2
arch/arm/boot/compressed/font.c
··· 1 + // SPDX-License-Identifier: GPL-2.0-only 2 + #include "../../../../lib/fonts/font_acorn_8x8.c"
+2
arch/arm/boot/compressed/hyp-stub.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + #include "../../kernel/hyp-stub.S"
+3
arch/arm/boot/compressed/lib1funcs.S
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* For __aeabi_uidivmod */ 3 + #include "../../lib/lib1funcs.S"
+1 -1
scripts/remove-stale-files
··· 24 24 # with O=, make sure to remove the stale files in the output tree. Otherwise, 25 25 # the build system wrongly compiles the stale ones. 26 26 if [ -n "${building_out_of_srctree}" ]; then 27 - for f in fdt_rw.c fdt_ro.c fdt_wip.c fdt.c 27 + for f in fdt_rw.c fdt_ro.c fdt_wip.c fdt.c ashldi3.S bswapsdi2.S font.c lib1funcs.S hyp-stub.S 28 28 do 29 29 rm -f arch/arm/boot/compressed/${f} 30 30 done