From bd91041bff259cf4303fa6bbb0b6bce33fa7c1e8 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 1 Mar 2016 21:06:02 -0800 Subject: Makefile: error out if the core has undefined symbols --unresolved-symbols=report-all apparently doesn't report the case where a symbol is requested but never referenced. Error out if necessary. Signed-off-by: H. Peter Anvin --- core/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/Makefile b/core/Makefile index b87007f3..46cb037c 100644 --- a/core/Makefile +++ b/core/Makefile @@ -162,6 +162,8 @@ NASM_ELF = elf -E --hash-style=gnu -M -o $@ $< \ --start-group $(LIBS) $(subst $(*F).elf,lib$(*F).a,$@) --end-group \ > $(@:.elf=.map) + if [ `$(NM) -D -u $@ | wc -l` -ne 0 ]; then \ + $(NM) -D -u $@ 1>&2; rm -f $@; false; fi $(OBJDUMP) -h $@ > $(@:.elf=.sec) $(PERL) $(SRC)/lstadjust.pl $(@:.elf=.lsr) $(@:.elf=.sec) $(@:.elf=.lst) -- cgit v1.2.1