Re: building debug version of klibc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux