summaryrefslogtreecommitdiffstats
path: root/arch/s390/scripts/Makefile.chkbss
blob: d92f2d94a5d94f0e7cfd0a237511bbbb59fff847 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# SPDX-License-Identifier: GPL-2.0

quiet_cmd_chkbss = CHKBSS  $<
define 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 $@;
endef

$(obj)/built-in.a: $(patsubst %, $(obj)/%.chkbss, $(chkbss))

%.o.chkbss: %.o
	$(call cmd,chkbss)