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

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(-)
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

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

-----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

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

-----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

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

-----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
participants (3)
-
Roy Zang
-
Wolfgang Denk
-
Zang Roy-R61911