mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-30 08:02:30 +00:00
5d680056cb
When I was refactoring cmd_ar_builtin in scripts/Makefile.build, I noticed the build breakage of s390. Some Makefiles of s390 add extra dependencies to built-in.a; built-in.a depends on timestamp files *.o.chkbss, but $(AR) does not want to include them into built-in.a. Insert a phony target 'chkbss' in between so that $(AR) can take $(filter-out $(PHONY), $^) as input. While I was here, I refactored Makefile.chkbss a little bit. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
20 lines
494 B
Makefile
20 lines
494 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
chkbss-target ?= built-in.a
|
|
$(obj)/$(chkbss-target): chkbss
|
|
|
|
chkbss-files := $(addsuffix .chkbss, $(chkbss))
|
|
clean-files += $(chkbss-files)
|
|
|
|
PHONY += chkbss
|
|
chkbss: $(addprefix $(obj)/, $(chkbss-files))
|
|
|
|
quiet_cmd_chkbss = CHKBSS $<
|
|
cmd_chkbss = \
|
|
if ! $(OBJDUMP) -j .bss -w -h $< | awk 'END { if ($$3) exit 1 }'; then \
|
|
echo "error: $< .bss section is not empty" >&2; exit 1; \
|
|
fi; \
|
|
touch $@;
|
|
|
|
$(obj)/%.o.chkbss: $(obj)/%.o
|
|
$(call cmd,chkbss)
|