From: sam@ravnborg.org (Sam Ravnborg)
To: kernelnewbies@lists.kernelnewbies.org
Subject: building debug version of klibc
Date: Sat, 30 Dec 2017 12:30:02 +0100 [thread overview]
Message-ID: <20171230113002.GA10794@ravnborg.org> (raw)
In-Reply-To: <CADxRZqz24hXaLZzSgn=4ZC-Mj53ecbq7J=AcwxVyypU6eNQVqA@mail.gmail.com>
Hi Anatoly
On Sat, Dec 30, 2017 at 01:54:05PM +0300, Anatoly Pugachev wrote:
> Hello!
>
> Can someone please help me in building debug version of klibc ?
>
> I've cloned git://git.kernel.org/pub/scm/libs/klibc/klibc.git , but
> failed to build it with debug info
>
> added "-g" to HOSTCFLAGS in Makefile, but
HOSTCFLAGS is used when building tools running on your build machine.
Try something like this (untested, whitespace damaged):
diff --git a/scripts/Kbuild.klibc b/scripts/Kbuild.klibc
index f500d535..3e8124f7 100644
--- a/scripts/Kbuild.klibc
+++ b/scripts/Kbuild.klibc
@@ -69,7 +69,7 @@ include $(srctree)/scripts/Kbuild.include
KLIBCREQFLAGS := $(call cc-option, -fno-stack-protector, ) \
$(call cc-option, -fwrapv, )
KLIBCARCHREQFLAGS :=
-KLIBCOPTFLAGS :=
+KLIBCOPTFLAGS := -g
KLIBCWARNFLAGS := -W -Wall -Wno-sign-compare -Wno-unused-parameter
KLIBCSHAREDFLAGS :=
KLIBCBITSIZE :=
If you use make V=1 then you should be able to see the
full gcc command line, where -g should be included with
theabove fix.
Sam
next prev parent reply other threads:[~2017-12-30 11:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-30 10:54 building debug version of klibc Anatoly Pugachev
2017-12-30 11:30 ` Sam Ravnborg [this message]
2017-12-30 12:00 ` Anatoly Pugachev
2017-12-30 12:00 ` Anatoly Pugachev
2017-12-30 12:00 ` valdis.kletnieks at vt.edu
2017-12-30 12:05 ` Anatoly Pugachev
2017-12-30 12:05 ` Anatoly Pugachev
2017-12-30 12:14 ` valdis.kletnieks at vt.edu
2017-12-30 12:14 ` valdis.kletnieks
2017-12-30 12:27 ` Anatoly Pugachev
2017-12-30 12:27 ` Anatoly Pugachev
2017-12-30 12:38 ` valdis.kletnieks at vt.edu
2017-12-30 12:38 ` valdis.kletnieks
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=20171230113002.GA10794@ravnborg.org \
--to=sam@ravnborg.org \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.