From f871c5d99d1efb11136a7f39b640e25afa971df9 Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Mon, 7 Jan 2019 05:49:27 +0000 Subject: [PATCH] Create MK_LOADER_VERBOSE and connect it to ELF_VERBOSE in the loader code. PR: 18498 Submitted by: mellon at pobox dot com --- share/mk/src.opts.mk | 1 + stand/loader.mk | 4 ++++ tools/build/options/WITH_LOADER_VERBOSE | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 tools/build/options/WITH_LOADER_VERBOSE diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 54fcdff9d83f..7aa53f35e5f4 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -204,6 +204,7 @@ __DEFAULT_NO_OPTIONS = \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ + LOADER_VERBOSE \ NAND \ OFED_EXTRA \ OPENLDAP \ diff --git a/stand/loader.mk b/stand/loader.mk index f0d6859764ea..e5149191fb47 100644 --- a/stand/loader.mk +++ b/stand/loader.mk @@ -155,6 +155,10 @@ vers.c: ${LDRSRC}/newvers.sh ${VERSION_FILE} sh ${LDRSRC}/newvers.sh ${REPRO_FLAG} ${VERSION_FILE} \ ${NEWVERSWHAT} +.if ${MK_LOADER_VERBOSE} != "no" +CFLAGS+= -DELF_VERBOSE +.endif + .if !empty(HELP_FILES) HELP_FILES+= ${LDRSRC}/help.common diff --git a/tools/build/options/WITH_LOADER_VERBOSE b/tools/build/options/WITH_LOADER_VERBOSE new file mode 100644 index 000000000000..a859c7a1952c --- /dev/null +++ b/tools/build/options/WITH_LOADER_VERBOSE @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to build with extra verbose debugging in the loader. +May explode already nearly too large loader over the limit. +Use with care. +