2018-05-03 22:40:13 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
2019-01-17 18:02:42 +08:00
|
|
|
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))
|
|
|
|
|
2018-05-03 22:40:13 +08:00
|
|
|
quiet_cmd_chkbss = CHKBSS $<
|
2019-01-17 18:02:42 +08:00
|
|
|
cmd_chkbss = \
|
2018-05-03 22:40:13 +08:00
|
|
|
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 $@;
|
2018-07-01 17:32:51 +08:00
|
|
|
|
2019-01-17 18:02:42 +08:00
|
|
|
$(obj)/%.o.chkbss: $(obj)/%.o
|
2018-05-03 22:40:13 +08:00
|
|
|
$(call cmd,chkbss)
|