summaryrefslogtreecommitdiffstats
path: root/arch/s390/scripts/Makefile.chkbss
blob: cd7e8f4419f51c5ab5426e39ec7dacfb47c22f80 (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 ! $(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)