summaryrefslogtreecommitdiffstats
path: root/arch/s390/scripts/Makefile.chkbss
blob: f4f4c2c6dee9eeae8a0b197538ed16d7cf1ed51d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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 ! $(OBJSIZE) --common $< | $(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)