diff mbox

[U-Boot] powerpc:Enable compiler debug option for powerpc platforms

Message ID 1300161222-19050-1-git-send-email-tie-fei.zang@freescale.com
State Changes Requested
Headers show

Commit Message

Zang Roy-R61911 March 15, 2011, 3:53 a.m. UTC
This patch enables compiler debug option for powerpc platforms
by default.  Patch is tested on 85xx/QorIQ platforms in u-boot
with CodeWarrior.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
---
Consider the comments 
http://lists.denx.de/pipermail/u-boot/2010-October/080689.html
http://lists.denx.de/pipermail/u-boot/2011-January/086485.html

 arch/powerpc/config.mk |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Comments

Wolfgang Denk April 24, 2011, 11:17 p.m. UTC | #1
Dear Roy Zang,

In message <1300161222-19050-1-git-send-email-tie-fei.zang@freescale.com> you wrote:
> This patch enables compiler debug option for powerpc platforms
> by default.  Patch is tested on 85xx/QorIQ platforms in u-boot
> with CodeWarrior.
> 
> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> Cc: Wood Scott-B07421 <B07421@freescale.com>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> ---
> Consider the comments 
> http://lists.denx.de/pipermail/u-boot/2010-October/080689.html
> http://lists.denx.de/pipermail/u-boot/2011-January/086485.html

Indeed.  In
http://lists.denx.de/pipermail/u-boot/2011-January/086485.html
I wrote:

| I don't see where this is specific to the Power architecture either -
| expect that you only tested it there.
| 
| My understanding is that you enable debug settings for the GNU
| debugger.
| 
| Do these need to be architecture specific? Probably not.
| 
| Do these need to be enabled by a new #define?  What would be the
| disadvantages of having these options always enabled, for all
| architectures?

You did not comment to these questions, and your current code is
still powerpc-centric.

Best regards,

Wolfgang Denk
Zang Roy-R61911 April 25, 2011, 2:19 a.m. UTC | #2
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd@denx.de]
> Sent: Monday, April 25, 2011 7:17 AM
> To: Zang Roy-R61911
> Cc: u-boot@lists.denx.de; Wood Scott-B07421; Kumar Gala
> Subject: Re: [PATCH] powerpc:Enable compiler debug option for powerpc
> platforms
> 
> Dear Roy Zang,
> 
> In message <1300161222-19050-1-git-send-email-tie-fei.zang@freescale.com> you
> wrote:
> > This patch enables compiler debug option for powerpc platforms
> > by default.  Patch is tested on 85xx/QorIQ platforms in u-boot
> > with CodeWarrior.
> >
> > Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
> > Cc: Wood Scott-B07421 <B07421@freescale.com>
> > Cc: Kumar Gala <galak@kernel.crashing.org>
> > ---
> > Consider the comments
> > http://lists.denx.de/pipermail/u-boot/2010-October/080689.html
> > http://lists.denx.de/pipermail/u-boot/2011-January/086485.html
> 
> Indeed.  In
> http://lists.denx.de/pipermail/u-boot/2011-January/086485.html
> I wrote:
> 
> | I don't see where this is specific to the Power architecture either -
> | expect that you only tested it there.
> |
> | My understanding is that you enable debug settings for the GNU
> | debugger.
> |
> | Do these need to be architecture specific? Probably not.
> |
> | Do these need to be enabled by a new #define?  What would be the
> | disadvantages of having these options always enabled, for all
> | architectures?
> 
> You did not comment to these questions, and your current code is
> still powerpc-centric.
Yes. because there is other voice:
http://lists.denx.de/pipermail/u-boot/2011-January/086489.html
http://lists.denx.de/pipermail/u-boot/2011-January/086512.html
any  comment?
Roy
Wolfgang Denk April 25, 2011, 8:39 a.m. UTC | #3
Dear Zang Roy-R61911,

In message <2239AC579C7D3646A720227A37E02681124B78@039-SN1MPN1-004.039d.mgd.msft.net> you wrote:
> 
> > You did not comment to these questions, and your current code is
> > still powerpc-centric.
> Yes. because there is other voice:
> http://lists.denx.de/pipermail/u-boot/2011-January/086489.html
> http://lists.denx.de/pipermail/u-boot/2011-January/086512.html
> any  comment?

It would be nice if you actually quoted the text parts that you are
referring to.

In any case, I read for example this:

|                                                            ... I can't 
| provide exact details, since the current toolchains work fine without 
| such tweaking - I only wanted to point out that if you need to specify 
| the exact debug format, then it might be platform-specific.
| 
| A simple "-g" should be fine in the common area.

I agree to this.

Best regards,

Wolfgang Denk
Zang Roy-R61911 April 25, 2011, 8:52 a.m. UTC | #4
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd@denx.de]
> Sent: Monday, April 25, 2011 16:39 PM
> To: Zang Roy-R61911
> Cc: u-boot@lists.denx.de; Wood Scott-B07421; Kumar Gala
> Subject: Re: [PATCH] powerpc:Enable compiler debug option for powerpc
> platforms
> 
> Dear Zang Roy-R61911,
> 
> In message <2239AC579C7D3646A720227A37E02681124B78@039-SN1MPN1-
> 004.039d.mgd.msft.net> you wrote:
> >
> > > You did not comment to these questions, and your current code is
> > > still powerpc-centric.
> > Yes. because there is other voice:
> > http://lists.denx.de/pipermail/u-boot/2011-January/086489.html
> > http://lists.denx.de/pipermail/u-boot/2011-January/086512.html
> > any  comment?
> 
> It would be nice if you actually quoted the text parts that you are
> referring to.
Will.
> 
> In any case, I read for example this:
> 
> |                                                            ... I can't
> | provide exact details, since the current toolchains work fine without
> | such tweaking - I only wanted to point out that if you need to specify
> | the exact debug format, then it might be platform-specific.
> |
> | A simple "-g" should be fine in the common area.
> 
> I agree to this.
So "-g" in the common area and leave "-gdwarf2" for platform-specific?
Roy
Zang Roy-R61911 April 25, 2011, 9:25 a.m. UTC | #5
> -----Original Message-----
> From: Wolfgang Denk [mailto:wd@denx.de]
> Sent: Monday, April 25, 2011 16:39 PM
> To: Zang Roy-R61911
> Cc: u-boot@lists.denx.de; Wood Scott-B07421; Kumar Gala
> Subject: Re: [PATCH] powerpc:Enable compiler debug option for powerpc
> platforms
> 
> Dear Zang Roy-R61911,
> 
> In message <2239AC579C7D3646A720227A37E02681124B78@039-SN1MPN1-
> 004.039d.mgd.msft.net> you wrote:
> >
> > > You did not comment to these questions, and your current code is
> > > still powerpc-centric.
> > Yes. because there is other voice:
> > http://lists.denx.de/pipermail/u-boot/2011-January/086489.html
> > http://lists.denx.de/pipermail/u-boot/2011-January/086512.html
> > any  comment?
> 
> It would be nice if you actually quoted the text parts that you are
> referring to.
> 
> In any case, I read for example this:
> 
> |                                                            ... I can't
> | provide exact details, since the current toolchains work fine without
> | such tweaking - I only wanted to point out that if you need to specify
> | the exact debug format, then it might be platform-specific.
> |
> | A simple "-g" should be fine in the common area.
> 
> I agree to this.
Also for a "-g" option, do you prefer adding to "PLATFORM_CPPFLAGS" or
"CPPFLAGS" ?
Thanks.
Roy
Wolfgang Denk April 25, 2011, 10:14 a.m. UTC | #6
Dear Zang Roy-R61911,

In message <2239AC579C7D3646A720227A37E02681124DC3@039-SN1MPN1-004.039d.mgd.msft.net> you wrote:
> 
> > |                                                            ... I can't
> > | provide exact details, since the current toolchains work fine without
> > | such tweaking - I only wanted to point out that if you need to specify
> > | the exact debug format, then it might be platform-specific.
> > |
> > | A simple "-g" should be fine in the common area.
> > 
> > I agree to this.
> So "-g" in the common area and leave "-gdwarf2" for platform-specific?

"-g" in the common area is probably OK.  Additional options may depend
on the architecture and/or tool chain used, so we better leave these
out from the mainline code.  If needed, they could be changed /
appended from the make command line.

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 64191c7..8bd57e3 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -53,3 +53,5 @@  endif
 ifeq ($(CROSS_COMPILE),powerpc-openbsd-)
 PLATFORM_CPPFLAGS+= -D__PPC__
 endif
+# default enable debug option for powerpc platform
+PLATFORM_CPPFLAGS+= -ggdb -Wa,-gdwarf2