mirror of
https://github.com/ipxe/ipxe
synced 2026-04-04 03:00:20 +03:00
[libc] Enable automated extraction of error usage reports
Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -550,6 +550,18 @@ $(BIN)/embedded.o : override CC := env CCACHE_DISABLE=1 $(CC)
|
||||
|
||||
CFLAGS_embedded = -DEMBED_ALL="$(EMBED_ALL)"
|
||||
|
||||
# Generate error usage information
|
||||
#
|
||||
$(BIN)/%.einfo : $(BIN)/%.o
|
||||
$(QM)$(ECHO) " [EINFO] $@"
|
||||
$(Q)$(OBJCOPY) -O binary -j .einfo --set-section-flags .einfo=alloc \
|
||||
$< $@
|
||||
|
||||
EINFOS := $(patsubst $(BIN)/%.o,$(BIN)/%.einfo,$(BOBJS))
|
||||
$(BIN)/errors : $(EINFOS) $(EINFO)
|
||||
$(QM)$(ECHO) " [EINFO] $@"
|
||||
$(Q)$(EINFO) $(EINFOS) | sort > $@
|
||||
|
||||
# Generate the NIC file from the parsed source files. The NIC file is
|
||||
# only for rom-o-matic.
|
||||
#
|
||||
@@ -902,6 +914,15 @@ $(ICCFIX) : util/iccfix.c $(MAKEDEPS)
|
||||
$(Q)$(HOST_CC) -idirafter include -O2 -o $@ $<
|
||||
CLEANUP += $(ICCFIX)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# The error usage information utility
|
||||
#
|
||||
$(EINFO) : util/einfo.c $(MAKEDEPS)
|
||||
$(QM)$(ECHO) " [HOSTCC] $@"
|
||||
$(Q)$(HOST_CC) -idirafter include -O2 -o $@ $<
|
||||
CLEANUP += $(EINFO)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Local configs
|
||||
|
||||
Reference in New Issue
Block a user