mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 13:26:45 +07:00
78c95647e7
"chkbss-target" could be now used to override default target .bss check is bound to. Objects to be checked are only path extended when needed. Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
20 lines
474 B
Makefile
20 lines
474 B
Makefile
# 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
|
|
|
|
chkbss-target ?= $(obj)/built-in.a
|
|
ifneq (,$(findstring /,$(chkbss)))
|
|
$(chkbss-target): $(patsubst %, %.chkbss, $(chkbss))
|
|
else
|
|
$(chkbss-target): $(patsubst %, $(obj)/%.chkbss, $(chkbss))
|
|
endif
|
|
|
|
%.o.chkbss: %.o
|
|
$(call cmd,chkbss)
|