Skip to contentSkip to conversation

AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

PATCH New Haavard Skinnemoen 4 participants 16 messages Sep 6, 2006 – Oct 26, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

In config.mk, -Wa,-gstabs is unconditionally appended to AFLAGS no matter what the target's preferred debugging format is. The AVR32 toolchain doesn't support the stabs debugging format at all, so this will obviously not work.

This patch replaces -gstabs with -g when compiling for AVR32, so that the default debugging format is used. Ulf Samuelsson reported problems on ARM when changing this unconditionally, so this patch has been updated to only change AVR32.

---
CHANGELOG:
Use -g instead of -gstabs in AFLAGS_DEBUG for AVR32

 config.mk |    4 ++++
 1 file changed, 4 insertions(+)
config.mk +4 -0
Index: u-boot-1.1.4-git/config.mk
===================================================================
@@ -164,7 +164,11 @@ CFLAGS := $(CPPFLAGS) -Wall -Wno-trigrap
 endif
 endif
 
+ifeq ($(ARCH),avr32)
+AFLAGS_DEBUG := -Wa,-g
+else
 AFLAGS_DEBUG := -Wa,-gstabs
+endif
 
 # turn jbsr into jsr for m68k
 ifeq ($(ARCH),m68k)
#2 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 9 lines · In message <[email protected]> you wrote:

In config.mk, -Wa,-gstabs is unconditionally appended to AFLAGS no matter what the target's preferred debugging format is. The AVR32 toolchain doesn't support the stabs debugging format at all, so this will obviously not work.

This patch replaces -gstabs with -g when compiling for AVR32, so that the default debugging format is used. Ulf Samuelsson reported problems on ARM when changing this unconditionally, so this patch has been updated to only change AVR32.

Previous identical patch already applied.

Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.
#3 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 7 lines · On Tue, 24 Oct 2006 14:59:40 +0200 Wolfgang Denk <[email protected]> wrote:

In message <[email protected]> you

Quoted 5 lines · wrote:

In config.mk, -Wa,-gstabs is unconditionally appended to AFLAGS no matter what the target's preferred debugging format is. The AVR32 toolchain doesn't support the stabs debugging format at all, so this will obviously not work.

Quoted 6 lines
Quoted 4 lines

This patch replaces -gstabs with -g when compiling for AVR32, so that the default debugging format is used. Ulf Samuelsson reported problems on ARM when changing this unconditionally, so this patch has been updated to only change AVR32.

Previous identical patch already applied.

Not 100% identical...this one only makes a difference on AVR32, while the other one changes everyone to use -g. Ulf reported build problems on ARM with the other patch, so I made it conditional.

Sure you don't want this patch instead of the other one?

Haavard

#4 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Hello,

Quoted 5 lines · in message <[email protected]> you wrote:
Quoted 5 lines
Quoted 5 lines

This patch replaces -gstabs with -g when compiling for AVR32, so that the default debugging format is used. Ulf Samuelsson reported problems on ARM when changing this unconditionally, so this patch has been updated to only change AVR32.

Oops. I missed this.

Quoted 7 lines
Quoted 1 line

Previous identical patch already applied.

Not 100% identical...this one only makes a difference on AVR32, while the other one changes everyone to use -g. Ulf reported build problems on ARM with the other patch, so I made it conditional.

Sure you don't want this patch instead of the other one?

I'm not sure. Which sort of problems was this exactly? Whic boards / platforms, and which toolchains?

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Generally speaking, there are other ways to accomplish whatever it is
that you think you need ...                               - Doug Gwyn
#5 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 11 lines · On Tue, 24 Oct 2006 16:47:36 +0200 Wolfgang Denk <[email protected]> wrote:

in message <[email protected]> you

Quoted 5 lines · wrote:

Not 100% identical...this one only makes a difference on AVR32, while the other one changes everyone to use -g. Ulf reported build problems on ARM with the other patch, so I made it conditional.

Sure you don't want this patch instead of the other one?

I'm not sure. Which sort of problems was this exactly? Whic boards / platforms, and which toolchains?

I'm not sure either, as -g works fine with my ARM toolchain. Ulf, can you elaborate?

Haavard

#6 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

In reply to Wolfgang Denk
Quoted 10 lines · Wolfgang Denk
Quoted 6 lines

Not 100% identical...this one only makes a difference on AVR32, while the other one changes everyone to use -g. Ulf reported build problems on ARM with the other patch, so I made it conditional.

Sure you don't want this patch instead of the other one?

I'm not sure. Which sort of problems was this exactly? Whic boards / platforms, and which toolchains?

Commit 2da2d9a4766063b9848f3a35ad6025499cf87265 is causing build problems when building the latest MPC8540ADS with the follow tools installed:

$ powerpc-unknown-linux-gnu-as

[r56630 at cde-tx32-ldt330 u-boot]$ powerpc-unknown-linux-gnu-as -v GNU assembler version 2.15 (powerpc-unknown-linux-gnu) using BFD version 2.15

$ powerpc-unknown-linux-gnu-gcc -v
Reading specs from /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/_TOOLS_/dist/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4 --with-local-prefix=/_TOOLS_/dist/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4 --enable-languages=c,c++,f77 --target=powerpc-unknown-linux-gnu --enable-threads
Thread model: posix
gcc version 3.4.3

The error is:

powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff80000 -I/temp/u-boot.work/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string -DCONFIG_MPC85xx=1 -DCONFIG_MPC8540=1 -DCONFIG_E500=1 -Wall -Wstrict-prototypes -c -o sched.o sched.c
powerpc-unknown-linux-gnu-gcc -Wa,-g -D__ASSEMBLY__ -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff80000 -I/temp/u-boot.work/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string -DCONFIG_MPC85xx=1 -DCONFIG_MPC8540=1 -DCONFIG_E500=1 -c -o ppc_longjmp.o ppc_longjmp.S
/_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/../../../../powerpc-unknown-linux-gnu/bin/as: option `-g' is ambiguous make[1]: *** [ppc_longjmp.o] Error 2
make[1]: Leaving directory `/temp/u-boot.work/u-boot/examples'
make: *** [examples] Error 2

I am not immediately sure what is going on but reverting the commit fixes the problem.

-Matthew

#7 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 9 lines · On Tue, 24 Oct 2006 19:44:35 -0500 Matthew McClintock <[email protected]> wrote:

Commit 2da2d9a4766063b9848f3a35ad6025499cf87265 is causing build problems when building the latest MPC8540ADS with the follow tools installed:

$ powerpc-unknown-linux-gnu-as

[r56630 at cde-tx32-ldt330 u-boot]$ powerpc-unknown-linux-gnu-as -v GNU assembler version 2.15 (powerpc-unknown-linux-gnu) using BFD version 2.15

Right. The 2.15 documentation doesn't seem to mention the -g option, only -g<debug format>.

Wolfgang, please consider applying the patch below to fix this problem.

---

From: Haavard_Skinnemoen <[email protected]>
Subject: [PATCH] Use -g in AFLAGS_DEBUG only on AVR32

Commit 2da2d9a4766063b9848f3a35ad6025499cf87265 changed AFLAGS_DEBUG to use -g instead of -gstabs. It turns out this breaks certain toolchains; at least binutils 2.15 on ppc and 2.16.1 on ARM, as reported by Matthew McClintock and Ulf Samuelsson, respectively.

This is arguably a bug in gas, as the man page for gas 2.16.1 states that the -g option should "generate debugging information for each assembler source line using whichever debug format is preferred by the target."

However, the 2.15 documentation says no such thing, so we should probably stick with using -gstabs for a while longer.

This patch changes config.mk to use -g only when compiling for AVR32 and -gstabs for all other targets.

---
 config.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
config.mk +4 -0
index 46e956f..6408ade 100644
@@ -169,7 +169,11 @@ CFLAGS := $(CPPFLAGS) -Wall -Wno-trigrap
 endif
 endif
 
+ifeq ($(ARCH),avr32)
 AFLAGS_DEBUG := -Wa,-g
+else
+AFLAGS_DEBUG := -Wa,-gstabs
+endif
 
 # turn jbsr into jsr for m68k
 ifeq ($(ARCH),m68k)
Signature · 1 line
1.4.1.1
#8 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 6 lines · In message <[email protected]> you wrote:
Quoted 3 lines · Matthew McClintock

Commit 2da2d9a4766063b9848f3a35ad6025499cf87265 is causing build problems when building the latest MPC8540ADS with the follow tools installed:

...

Quoted 2 lines

Right. The 2.15 documentation doesn't seem to mention the -g option, only -g<debug format>.

Ummm...

This file is a user guide to the GNU assembler `as' version 2.15.94.0.2.2.
...
1 Overview
**********

Here is a brief summary of how to invoke `as'. For details, *note Command-Line Options: Invoking.

     as [-a[cdhlns][=FILE]] [-alternate] [-D]
      [-defsym SYM=VAL] [-f] [-g] [-gstabs] [-gstabs+]
      [-gdwarf-2] [-help] [-I DIR] [-J] [-K] [-L]

...
`-g'
`--gen-debug'
Generate debugging information for each assembler source line using whichever debug format is preferred by the target. This currently means either STABS, ECOFF or DWARF2.

Am I missing something?

Quoted 1 line

Wolfgang, please consider applying the patch below to fix this problem.

I do, but I'd like to understand the problem first. Matthew's example looked to me as if the gcc driver was calling "as" as a result of a "gcc -g" command, and this should IMHO always work.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The C-shell doesn't parse. It adhoculates.
    - Casper.Dik at Holland.Sun.COM in <[email protected]>
#9 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 8 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you wrote:

Right. The 2.15 documentation doesn't seem to mention the -g option, only -g<debug format>.

Ummm...

This file is a user guide to the GNU assembler `as' version 2.15.94.0.2.2.

2.15.94 is actually closer to 2.16 than 2.15...

If you look at the as.texinfo file tagged as binutils_2_15, the -g option is only documented for certain targets, e.g. Alpha and MIPS:

http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/doc/as.texinfo?rev=1.96&content-type=text/x-cvsweb-markup&cvsroot=src&only_with_tag=binutils-2_15

Quoted 5 lines
Quoted 1 line

Wolfgang, please consider applying the patch below to fix this problem.

I do, but I'd like to understand the problem first. Matthew's example looked to me as if the gcc driver was calling "as" as a result of a "gcc -g" command, and this should IMHO always work.

Yes, "gcc -g" should always work. However, in Matthew's example, the command line also included "-Wa,-g", which injects the -g option directly into the command line for the assembler, and that seems to work only for 2.16 and later (or maybe not even that in case of ARM.)

I wonder if gcc will automatically pass the correct -g<whatever> option to gas when it's given the -g option? If that's the case, I suppose we could simply remove -Wa,-g and everyone will be happy...

Haavard

#10 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 3 lines · In message <[email protected]> you…

If you look at the as.texinfo file tagged as binutils_2_15, the -g option is only documented for certain targets, e.g. Alpha and MIPS:

I see.

Quoted 2 lines

Yes, "gcc -g" should always work. However, in Matthew's example, the command line also included "-Wa,-g", which injects the -g option

"-Wa,-g" is only set in AFLAGS_DEBUG.

Quoted 2 lines

directly into the command line for the assembler, and that seems to work only for 2.16 and later (or maybe not even that in case of ARM.)

But we've been using this for a long, long time. It's been working fine with ELDK 3.x (GCC-3.3.3 / binutils 2.14) on ARM, MIPS and PPC.

Quoted 3 lines

I wonder if gcc will automatically pass the correct -g<whatever> option to gas when it's given the -g option? If that's the case, I suppose we could simply remove -Wa,-g and everyone will be happy...

I think it does:

-> arm-linux-gcc -v -g -c foo.s
Using built-in specs.
Target: arm-linux
Configured with: /opt/eldk/build/arm-2006-02-19/work/usr/src/denx/BUILD/crosstool-0.35/build/gcc-4.0.0-glibc-2.3.5-eldk/arm-linux/gcc-4.0.0/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/var/tmp/eldk.Ks4ZhN/usr/crosstool/gcc-4.0.0-glibc-2.3.5-eldk/arm-linux --with-headers=/var/tmp/eldk.Ks4ZhN/usr/crosstool/gcc-4.0.0-glibc-2.3.5-eldk/arm-linux/arm-linux/include --with-local-prefix=/var/tmp/eldk.Ks4ZhN/usr/crosstool/gcc-4.0.0-glibc-2.3.5-eldk/arm-linux/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long Thread model: posix
gcc version 4.0.0 (DENX ELDK 4.0 4.0.0)
/opt/eldk-4.0-2006-02-19/usr/bin/../lib/gcc/arm-linux/4.0.0/../../../../arm-linux/bin/as --gdwarf2 -mcpu=arm9 -mfpu=softvfp -o foo.o foo.s

See the "--gdwarf2" passed to as.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all possible committee reactions to any  given  agenda  item,  the
reaction  that will occur is the one which will liberate the greatest
amount of hot air.                                -- Thomas L. Martin
#11 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 5 lines · Wolfgang Denk
Quoted 2 lines · In message <[email protected]> you…

Yes, "gcc -g" should always work. However, in Matthew's example, the command line also included "-Wa,-g", which injects the -g option

"-Wa,-g" is only set in AFLAGS_DEBUG.

Yes, and it breaks only for assembly files, as shown by Matthew's example:

powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi
-D__KERNEL__ -DTEXT_BASE=0xfff80000
-I/temp/u-boot.work/u-boot/include -fno-builtin -ffreestanding
-nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500
-ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string
-DCONFIG_MPC85xx=1 -DCONFIG_MPC8540=1 -DCONFIG_E500=1 -Wall
-Wstrict-prototypes -c -o sched.o sched.c

this one compiles just fine...

powerpc-unknown-linux-gnu-gcc -Wa,-g -D__ASSEMBLY__ -g -Os -fPIC
-ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff80000
-I/temp/u-boot.work/u-boot/include -fno-builtin -ffreestanding
-nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include
-pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500
-ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string
-DCONFIG_MPC85xx=1 -DCONFIG_MPC8540=1 -DCONFIG_E500=1 -c -o
ppc_longjmp.o ppc_longjmp.S /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/../../../../powerpc-unknown-linux-gnu/bin/as:
option `-g' is ambiguous

...but this one fails because of the -Wa,-g option.

Quoted 5 lines
Quoted 2 lines

directly into the command line for the assembler, and that seems to work only for 2.16 and later (or maybe not even that in case of ARM.)

But we've been using this for a long, long time. It's been working fine with ELDK 3.x (GCC-3.3.3 / binutils 2.14) on ARM, MIPS and PPC.

Yes, -gstabs has probably been supported a lot longer.

Quoted 7 lines
Quoted 3 lines

I wonder if gcc will automatically pass the correct -g<whatever> option to gas when it's given the -g option? If that's the case, I suppose we could simply remove -Wa,-g and everyone will be happy...

/opt/eldk-4.0-2006-02-19/usr/bin/../lib/gcc/arm-linux/4.0.0/../../../../arm-linux/bin/as --gdwarf2 -mcpu=arm9 -mfpu=softvfp -o foo.o foo.s

See the "--gdwarf2" passed to as.

Indeed. I can send you a new patch tomorrow which simply removes -Wa,-g for all targets (the -g option should still be there.) Unfortunately, it will be more difficult to spot breakage with such a patch as the assembler will just silently not generate any debug information if you're using a version of gcc which does not pass any -g<whatever> option on to the assembler.

On the other hand, such breakage won't be that critical since things will still build and run properly. I'm not the right person to decide, as there is nothing older than gcc 4.0 and binutils 2.16 available for AVR32. I just need to get rid of the -gstabs option, as the avr32 toolchain only supports dwarf2...

Haavard

#12 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

Quoted 2 lines · On Wed, 25 Oct 2006 23:52:06 +0200 "Haavard Skinnemoen"…

Indeed. I can send you a new patch tomorrow which simply removes -Wa,-g for all targets (the -g option should still be there.)

Hmmm...it turns out that avr32-gcc does in fact not pass on any --gdwarf2 option to the assembler when using -g. Of course, if this is only true for AVR32, we can fix this, but I'm a bit concerned that this behaviour is arch-specific.

FWIW, here's a patch to remove the -Wa,-g option. If you decide to go for it, I'll make sure the AVR32 toolchain gets fixed.

Haavard

---

From: Haavard Skinnemoen <[email protected]>
Subject: [PATCH] Don't pass any debug options directly to the assembler

When passing the -g option to gcc, gcc automatically selects a suitable --g<format> option to pass on to the assembler. Thus, there's no point in forcing a specific debug option on the assembler using the -Wa mechanism.

---
 config.mk |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
config.mk +3 -1
index 46e956f..f65d3ca 100644
@@ -169,7 +169,9 @@ CFLAGS := $(CPPFLAGS) -Wall -Wno-trigrap
 endif
 endif
 
-AFLAGS_DEBUG := -Wa,-g
+# $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format>
+# option to the assembler.
+AFLAGS_DEBUG :=
 
 # turn jbsr into jsr for m68k
 ifeq ($(ARCH),m68k)
Signature · 1 line
1.4.1.1
#13 lore raw

PATCH 1/6 AVR32: Use -g instead of -gstabs in AFLAGS_DEBUG

In reply to Matthew McClintock
Quoted 6 lines · In message <1161737075.5011.8.camel@localhost> you wrote:

Commit 2da2d9a4766063b9848f3a35ad6025499cf87265 is causing build problems when building the latest MPC8540ADS with the follow tools installed:

$ powerpc-unknown-linux-gnu-as

How was this configured / built? Ant known to be working standard way like crosstool etc?

Quoted 5 lines

The error is:

powerpc-unknown-linux-gnu-gcc -g -Os -fPIC -ffixed-r14 -meabi -D__KERNEL__ -DTEXT_BASE=0xfff80000 -I/temp/u-boot.work/u-boot/include -fno-builtin -ffreestanding -nostdinc -isystem /_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu
/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/include -pipe -DCONFIG_PPC -D__powerpc__ -DCONFIG_MPC85xx -DCONFIG_E500 -ffixed-r2 -ffixed-r29 -Wa,-me500 -msoft-float -mno-string -DCONFIG_MPC85xx=1 -DCONFIG_MPC8540=1 -DCONFIG_E500=1 -W all -Wstrict-prototypes -c -o sched.o sched.c

Ummm... but ${CROSS_COMPILE}gcc -g ... is IMHO a perfectly legal way to run GCC:

`-g'
Produce debugging information in the operating system's native format (stabs, COFF, XCOFF, or DWARF 2). GDB can work with this debugging information.

Quoted 5 lines

/_TOOLS_/.dist0/gnu-gcc-3.4.3-binutils-2.15-powerpc-unknown-linux-gnu/i686-pc-linux2.4/bin/../lib/gcc/powerpc-unknown-linux-gnu/3.4.3/../../../../powerpc-unknown-linux-gnu/bin/as: option `-g' is ambiguous

I am not immediately sure what is going on but reverting the commit fixes the problem.

IMHO this is a tool configuration issue.

Best regards,

Wolfgang Denk

Signature · 7 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I see that Microsoft's campaign  to  destroy  all  knowledge  of  any
operating   environment   but  its  own  environment-of-the-year  has
succeeded in creating a generation of users who don't understand  the
concept of a shell...
            -- L. Peter Deutsch in <[email protected]>
#14 lore raw

PATCH 2/6 Support uImage files for the AVR32 architecture

In reply to a message not in the archive

Define IH_CPU_AVR32, make it possible to generate AVR32 uImage files with mkimage and make cmd_bootm recognize them.

---
CHANGELOG:
Add support for uImage files for the AVR32 architecture

 common/cmd_bootm.c |    3 +++
 include/image.h    |    1 +
 tools/mkimage.c    |    1 +
 3 files changed, 5 insertions(+), 0 deletions(-)
common/cmd_bootm.c +3 -0
index fdf7180..2168e67 100644
@@ -260,6 +260,8 @@ #elif defined(__nios2__)
 	if (hdr->ih_arch != IH_CPU_NIOS2)
 #elif defined(__blackfin__)
 	if (hdr->ih_arch != IH_CPU_BLACKFIN)
+#elif defined(__avr32__)
+	if (hdr->ih_arch != IH_CPU_AVR32)
 #else
 # error Unknown CPU type
 #endif
@@ -1236,6 +1238,7 @@ #endif
 	case IH_CPU_INVALID:	arch = "Invalid CPU";		break;
 	case IH_CPU_ALPHA:	arch = "Alpha";			break;
 	case IH_CPU_ARM:	arch = "ARM";			break;
+	case IH_CPU_AVR32:	arch = "AVR32";			break;
 	case IH_CPU_I386:	arch = "Intel x86";		break;
 	case IH_CPU_IA64:	arch = "IA64";			break;
 	case IH_CPU_MIPS:	arch = "MIPS";			break;
include/image.h +1 -0
index 139df0b..d9f2d46 100644
@@ -76,6 +76,7 @@ #define IH_CPU_NIOS		13	/* Nios-32	*/
 #define IH_CPU_MICROBLAZE	14	/* MicroBlaze   */
 #define IH_CPU_NIOS2		15	/* Nios-II	*/
 #define IH_CPU_BLACKFIN		16	/* Blackfin	*/
+#define IH_CPU_AVR32		17	/* AVR32	*/
 
 /*
  * Image Types
tools/mkimage.c +1 -0
index fea3e5b..2cb2524 100644
@@ -94,6 +94,7 @@ table_entry_t arch_name[] = {
     {	IH_CPU_SPARC,		"sparc",	"SPARC",	},
     {	IH_CPU_SPARC64,		"sparc64",	"SPARC 64 Bit",	},
     {	IH_CPU_BLACKFIN,	"blackfin",	"Blackfin",	},
+    {	IH_CPU_AVR32,		"avr32",	"AVR32",	},
     {	-1,			"",		"",		},
 };
 
Signature · 1 line
1.4.1.1
#15 lore raw

PATCH 3/6 AVR32 architecture support

In reply to a message not in the archive

The attached patch adds support for the AVR32 architecture to u-boot. Please see the patch header for details.

CHANGELOG:
Add support for the AVR32 architecture

Haavard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avr32-arch.patch.gz
Type: application/x-gzip
Size: 19273 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20060906/057b3d00/attachment.bin

#16 lore raw

PATCH 3/6 AVR32 architecture support

Quoted 6 lines · In message <[email protected]> you wrote:

The attached patch adds support for the AVR32 architecture to u-boot. Please see the patch header for details.

CHANGELOG:
Add support for the AVR32 architecture

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
First study the enemy.  Seek weakness.
	-- Romulan Commander, "Balance of Terror", stardate 1709.2