mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] pbl: define DEBUG globally when CONFIG_INITCALL_DEBUG=y
Date: Mon, 17 Oct 2022 09:04:57 +0200	[thread overview]
Message-ID: <20221017070457.1456218-1-a.fatoum@pengutronix.de> (raw)

CONFIG_INITCALL_DEBUG=y is a very useful tool for debugging barebox
hangs, but it's not so useful if the hang happens very early. As PBL's
function can be construed as preparing for initcall execution,
CONFIG_INITCALL_DEBUG should enable PBL debugging too, so let's just do
that.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/Makefile.lib | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 16308497b845..8cda2a3187ba 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -156,6 +156,10 @@ _c_flags       += $(if $(patsubst n%,, \
 PBL_CPPFLAGS   += $(call cc-option,-fno-sanitize=all)
 endif
 
+ifeq ($(CONFIG_DEBUG_INITCALLS),y)
+PBL_CPPFLAGS   += -DDEBUG
+endif
+
 # If building barebox in a separate objtree expand all occurrences
 # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/').
 
-- 
2.30.2




             reply	other threads:[~2022-10-17  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17  7:04 Ahmad Fatoum [this message]
2022-12-09  7:15 ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221017070457.1456218-1-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox