Skip to content

Commit 251cc82

Browse files
masahir0yRussell King (Oracle)
authored andcommitted
ARM: 9154/1: decompressor: do not copy source files while building
As commit 7ae4a78 ("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 <[email protected]> Signed-off-by: Russell King (Oracle) <[email protected]>
1 parent fa55b7d commit 251cc82

File tree

8 files changed

+17
-36
lines changed

8 files changed

+17
-36
lines changed

arch/arm/boot/compressed/.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0-only
2-
ashldi3.S
3-
bswapsdi2.S
4-
font.c
5-
lib1funcs.S
6-
hyp-stub.S
72
piggy_data
83
vmlinux
94
vmlinux.lds

arch/arm/boot/compressed/Makefile

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y)
1313
OBJS += debug.o
1414
AFLAGS_head.o += -DDEBUG
1515
endif
16-
FONTC = $(srctree)/lib/fonts/font_acorn_8x8.c
1716

1817
# string library code (-Os is enforced to keep it much smaller)
1918
OBJS += string.o
@@ -99,11 +98,8 @@ $(foreach o, $(libfdt_objs) atags_to_fdt.o fdt_check_mem_start.o, \
9998
$(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector))
10099

101100
targets := vmlinux vmlinux.lds piggy_data piggy.o \
102-
lib1funcs.o ashldi3.o bswapsdi2.o \
103101
head.o $(OBJS)
104102

105-
clean-files += lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
106-
107103
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
108104

109105
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
@@ -134,23 +130,7 @@ endif
134130
# Next argument is a linker script
135131
LDFLAGS_vmlinux += -T
136132

137-
# For __aeabi_uidivmod
138-
lib1funcs = $(obj)/lib1funcs.o
139-
140-
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
141-
$(call cmd,shipped)
142-
143-
# For __aeabi_llsl
144-
ashldi3 = $(obj)/ashldi3.o
145-
146-
$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S
147-
$(call cmd,shipped)
148-
149-
# For __bswapsi2, __bswapdi2
150-
bswapsdi2 = $(obj)/bswapsdi2.o
151-
152-
$(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
153-
$(call cmd,shipped)
133+
OBJS += lib1funcs.o ashldi3.o bswapsdi2.o
154134

155135
# We need to prevent any GOTOFF relocs being used with references
156136
# to symbols in the .bss section since we cannot relocate them
@@ -175,8 +155,8 @@ fi
175155
efi-obj-$(CONFIG_EFI_STUB) := $(objtree)/drivers/firmware/efi/libstub/lib.a
176156

177157
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
178-
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \
179-
$(bswapsdi2) $(efi-obj-y) FORCE
158+
$(addprefix $(obj)/, $(OBJS)) \
159+
$(efi-obj-y) FORCE
180160
@$(check_for_multiple_zreladdr)
181161
$(call if_changed,ld)
182162
@$(check_for_bad_syms)
@@ -187,11 +167,4 @@ $(obj)/piggy_data: $(obj)/../Image FORCE
187167
$(obj)/piggy.o: $(obj)/piggy_data
188168

189169
CFLAGS_font.o := -Dstatic=
190-
191-
$(obj)/font.c: $(FONTC)
192-
$(call cmd,shipped)
193-
194170
AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
195-
196-
$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
197-
$(call cmd,shipped)

arch/arm/boot/compressed/ashldi3.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/* For __aeabi_llsl */
3+
#include "../../lib/ashldi3.S"

arch/arm/boot/compressed/bswapsdi2.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/* For __bswapsi2, __bswapdi2 */
3+
#include "../../lib/bswapsdi2.S"

arch/arm/boot/compressed/font.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// SPDX-License-Identifier: GPL-2.0-only
2+
#include "../../../../lib/fonts/font_acorn_8x8.c"

arch/arm/boot/compressed/hyp-stub.S

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
#include "../../kernel/hyp-stub.S"

arch/arm/boot/compressed/lib1funcs.S

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/* For __aeabi_uidivmod */
3+
#include "../../lib/lib1funcs.S"

scripts/remove-stale-files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set -e
2424
# with O=, make sure to remove the stale files in the output tree. Otherwise,
2525
# the build system wrongly compiles the stale ones.
2626
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
2828
do
2929
rm -f arch/arm/boot/compressed/${f}
3030
done

0 commit comments

Comments
 (0)