mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 13:19:56 -04:00
sh: boot: avoid unneeded rebuilds under arch/sh/boot/compressed/
Even if none of source code is updated, the following are every time rebuilt: CC arch/sh/boot/compressed/cache.o SHIPPED arch/sh/boot/compressed/ashiftrt.S AS arch/sh/boot/compressed/ashiftrt.o SHIPPED arch/sh/boot/compressed/ashldi3.c CC arch/sh/boot/compressed/ashldi3.o SHIPPED arch/sh/boot/compressed/ashrsi3.S AS arch/sh/boot/compressed/ashrsi3.o SHIPPED arch/sh/boot/compressed/ashlsi3.S AS arch/sh/boot/compressed/ashlsi3.o SHIPPED arch/sh/boot/compressed/lshrsi3.S AS arch/sh/boot/compressed/lshrsi3.o LD arch/sh/boot/compressed/vmlinux OBJCOPY arch/sh/boot/zImage Add build artifacts to 'targets' as needed. I turned the library files to check-in files. It is simpler than copying from arch/sh/lib/ at build-time. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Rich Felker <dalias@libc.org>
This commit is contained in:
committed by
Rich Felker
parent
7b6ef6e570
commit
7fe859eef9
5
arch/sh/boot/compressed/.gitignore
vendored
5
arch/sh/boot/compressed/.gitignore
vendored
@@ -1,7 +1,2 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
ashiftrt.S
|
|
||||||
ashldi3.c
|
|
||||||
ashlsi3.S
|
|
||||||
ashrsi3.S
|
|
||||||
lshrsi3.S
|
|
||||||
vmlinux.bin.*
|
vmlinux.bin.*
|
||||||
|
|||||||
@@ -5,12 +5,18 @@
|
|||||||
# create a compressed vmlinux image from the original vmlinux
|
# create a compressed vmlinux image from the original vmlinux
|
||||||
#
|
#
|
||||||
|
|
||||||
targets := vmlinux vmlinux.bin vmlinux.bin.gz \
|
OBJECTS := head_32.o misc.o cache.o piggy.o \
|
||||||
vmlinux.bin.bz2 vmlinux.bin.lzma \
|
ashiftrt.o ashldi3.o ashrsi3.o ashlsi3.o lshrsi3.o
|
||||||
vmlinux.bin.xz vmlinux.bin.lzo \
|
|
||||||
head_32.o misc.o piggy.o
|
|
||||||
|
|
||||||
OBJECTS = $(obj)/head_32.o $(obj)/misc.o $(obj)/cache.o
|
# These were previously generated files. When you are building the kernel
|
||||||
|
# with O=, make sure to remove the stale files in the output tree. Otherwise,
|
||||||
|
# the build system wrongly compiles the stale ones.
|
||||||
|
ifdef building_out_of_srctree
|
||||||
|
$(shell rm -f $(addprefix $(obj)/, ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S lshrsi3.S))
|
||||||
|
endif
|
||||||
|
|
||||||
|
targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 \
|
||||||
|
vmlinux.bin.lzma vmlinux.bin.xz vmlinux.bin.lzo $(OBJECTS)
|
||||||
|
|
||||||
GCOV_PROFILE := n
|
GCOV_PROFILE := n
|
||||||
|
|
||||||
@@ -33,21 +39,9 @@ ccflags-remove-$(CONFIG_MCOUNT) += -pg
|
|||||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
||||||
-T $(obj)/../../kernel/vmlinux.lds
|
-T $(obj)/../../kernel/vmlinux.lds
|
||||||
|
|
||||||
#
|
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||||
# Pull in the necessary libgcc bits from the in-kernel implementation.
|
|
||||||
#
|
|
||||||
lib1funcs-y := ashiftrt.S ashldi3.c ashrsi3.S ashlsi3.S lshrsi3.S
|
|
||||||
lib1funcs-obj := \
|
|
||||||
$(addsuffix .o, $(basename $(addprefix $(obj)/, $(lib1funcs-y))))
|
|
||||||
|
|
||||||
lib1funcs-dir := $(srctree)/arch/$(SRCARCH)/lib
|
$(obj)/vmlinux: $(addprefix $(obj)/, $(OBJECTS)) FORCE
|
||||||
|
|
||||||
KBUILD_CFLAGS += -I$(lib1funcs-dir) -DDISABLE_BRANCH_PROFILING
|
|
||||||
|
|
||||||
$(addprefix $(obj)/,$(lib1funcs-y)): $(obj)/%: $(lib1funcs-dir)/% FORCE
|
|
||||||
$(call cmd,shipped)
|
|
||||||
|
|
||||||
$(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(lib1funcs-obj) FORCE
|
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
|
|
||||||
$(obj)/vmlinux.bin: vmlinux FORCE
|
$(obj)/vmlinux.bin: vmlinux FORCE
|
||||||
|
|||||||
2
arch/sh/boot/compressed/ashiftrt.S
Normal file
2
arch/sh/boot/compressed/ashiftrt.S
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
#include "../../lib/ashiftrt.S"
|
||||||
2
arch/sh/boot/compressed/ashldi3.c
Normal file
2
arch/sh/boot/compressed/ashldi3.c
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#include "../../lib/ashldi3.c"
|
||||||
2
arch/sh/boot/compressed/ashlsi3.S
Normal file
2
arch/sh/boot/compressed/ashlsi3.S
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
#include "../../lib/ashlsi3.S"
|
||||||
2
arch/sh/boot/compressed/ashrsi3.S
Normal file
2
arch/sh/boot/compressed/ashrsi3.S
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
#include "../../lib/ashrsi3.S"
|
||||||
2
arch/sh/boot/compressed/lshrsi3.S
Normal file
2
arch/sh/boot/compressed/lshrsi3.S
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
#include "../../lib/lshrsi3.S"
|
||||||
Reference in New Issue
Block a user