mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 23:23:55 +08:00
ARM: 9154/1: decompressor: do not copy source files while building
As commit 7ae4a78daa
("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>
This commit is contained in:
parent
fa55b7dcdc
commit
251cc826be
5
arch/arm/boot/compressed/.gitignore
vendored
5
arch/arm/boot/compressed/.gitignore
vendored
@ -1,9 +1,4 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
ashldi3.S
|
||||
bswapsdi2.S
|
||||
font.c
|
||||
lib1funcs.S
|
||||
hyp-stub.S
|
||||
piggy_data
|
||||
vmlinux
|
||||
vmlinux.lds
|
||||
|
@ -13,7 +13,6 @@ ifeq ($(CONFIG_DEBUG_UNCOMPRESS),y)
|
||||
OBJS += debug.o
|
||||
AFLAGS_head.o += -DDEBUG
|
||||
endif
|
||||
FONTC = $(srctree)/lib/fonts/font_acorn_8x8.c
|
||||
|
||||
# string library code (-Os is enforced to keep it much smaller)
|
||||
OBJS += string.o
|
||||
@ -99,11 +98,8 @@ $(foreach o, $(libfdt_objs) atags_to_fdt.o fdt_check_mem_start.o, \
|
||||
$(eval CFLAGS_$(o) := -I $(srctree)/scripts/dtc/libfdt -fno-stack-protector))
|
||||
|
||||
targets := vmlinux vmlinux.lds piggy_data piggy.o \
|
||||
lib1funcs.o ashldi3.o bswapsdi2.o \
|
||||
head.o $(OBJS)
|
||||
|
||||
clean-files += lib1funcs.S ashldi3.S bswapsdi2.S hyp-stub.S
|
||||
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
ccflags-y := -fpic $(call cc-option,-mno-single-pic-base,) -fno-builtin \
|
||||
@ -134,23 +130,7 @@ endif
|
||||
# Next argument is a linker script
|
||||
LDFLAGS_vmlinux += -T
|
||||
|
||||
# For __aeabi_uidivmod
|
||||
lib1funcs = $(obj)/lib1funcs.o
|
||||
|
||||
$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S
|
||||
$(call cmd,shipped)
|
||||
|
||||
# For __aeabi_llsl
|
||||
ashldi3 = $(obj)/ashldi3.o
|
||||
|
||||
$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S
|
||||
$(call cmd,shipped)
|
||||
|
||||
# For __bswapsi2, __bswapdi2
|
||||
bswapsdi2 = $(obj)/bswapsdi2.o
|
||||
|
||||
$(obj)/bswapsdi2.S: $(srctree)/arch/$(SRCARCH)/lib/bswapsdi2.S
|
||||
$(call cmd,shipped)
|
||||
OBJS += lib1funcs.o ashldi3.o bswapsdi2.o
|
||||
|
||||
# We need to prevent any GOTOFF relocs being used with references
|
||||
# to symbols in the .bss section since we cannot relocate them
|
||||
@ -175,8 +155,8 @@ fi
|
||||
efi-obj-$(CONFIG_EFI_STUB) := $(objtree)/drivers/firmware/efi/libstub/lib.a
|
||||
|
||||
$(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.o \
|
||||
$(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) \
|
||||
$(bswapsdi2) $(efi-obj-y) FORCE
|
||||
$(addprefix $(obj)/, $(OBJS)) \
|
||||
$(efi-obj-y) FORCE
|
||||
@$(check_for_multiple_zreladdr)
|
||||
$(call if_changed,ld)
|
||||
@$(check_for_bad_syms)
|
||||
@ -187,11 +167,4 @@ $(obj)/piggy_data: $(obj)/../Image FORCE
|
||||
$(obj)/piggy.o: $(obj)/piggy_data
|
||||
|
||||
CFLAGS_font.o := -Dstatic=
|
||||
|
||||
$(obj)/font.c: $(FONTC)
|
||||
$(call cmd,shipped)
|
||||
|
||||
AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
|
||||
|
||||
$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
|
||||
$(call cmd,shipped)
|
||||
|
3
arch/arm/boot/compressed/ashldi3.S
Normal file
3
arch/arm/boot/compressed/ashldi3.S
Normal file
@ -0,0 +1,3 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* For __aeabi_llsl */
|
||||
#include "../../lib/ashldi3.S"
|
3
arch/arm/boot/compressed/bswapsdi2.S
Normal file
3
arch/arm/boot/compressed/bswapsdi2.S
Normal file
@ -0,0 +1,3 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* For __bswapsi2, __bswapdi2 */
|
||||
#include "../../lib/bswapsdi2.S"
|
2
arch/arm/boot/compressed/font.c
Normal file
2
arch/arm/boot/compressed/font.c
Normal file
@ -0,0 +1,2 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include "../../../../lib/fonts/font_acorn_8x8.c"
|
2
arch/arm/boot/compressed/hyp-stub.S
Normal file
2
arch/arm/boot/compressed/hyp-stub.S
Normal file
@ -0,0 +1,2 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include "../../kernel/hyp-stub.S"
|
3
arch/arm/boot/compressed/lib1funcs.S
Normal file
3
arch/arm/boot/compressed/lib1funcs.S
Normal file
@ -0,0 +1,3 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* For __aeabi_uidivmod */
|
||||
#include "../../lib/lib1funcs.S"
|
@ -24,7 +24,7 @@ set -e
|
||||
# with O=, make sure to remove the stale files in the output tree. Otherwise,
|
||||
# the build system wrongly compiles the stale ones.
|
||||
if [ -n "${building_out_of_srctree}" ]; then
|
||||
for f in fdt_rw.c fdt_ro.c fdt_wip.c fdt.c
|
||||
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
|
||||
do
|
||||
rm -f arch/arm/boot/compressed/${f}
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user