Skip to contentSkip to conversation

GCC version for Linux kernel?

U-Boot-Users Allen Curtis 6 participants 15 messages Jun 13, 2005 – Jun 15, 2005

lore
Share & tools
lore
#0 lore raw

I am using GCC 3.4.2 for PowerPC. When you compile the Linux 2.4 PPC kernel you get lots of "deprecated" warning messages from the compiler. What is the recommended GCC version?
TIA

#1 lore raw
Quoted 3 lines · In message <[email protected]> you wrote:

I am using GCC 3.4.2 for PowerPC. When you compile the Linux 2.4 PPC kernel you get lots of "deprecated" warning messages from the compiler. What is the recommended GCC version?

GCC < 3.4.x (We use GCC 3.3.3 in our ELDK).

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: [email protected]
The day-to-day travails of the IBM programmer are so amusing to  most
of us who are fortunate enough never to have been one - like watching
Charlie Chaplin trying to cook a shoe.
#2 lore raw
Quoted 1 line

GCC < 3.4.x (We use GCC 3.3.3 in our ELDK).

Unfortunately gcc 3.4.x produces faster code for PPC. We compile U-Boot with the eldk compiler and everything else with gcc-3.4.3 (buildroot toolchain).

IIRC, the difference was about >10-15% for parsing mpeg streams.

Signature · 11 lines
  greetz, marc
Revenge is a feast best served immediately.
	D'Argo - Dog With Two Bones
scorpius 2.6.11 #1 Wed Mar 2 16:38:38 CET 2005 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050614/da4c3548/attachment.pgp 
#3 lore raw
Quoted 9 lines · Marc Leeman
Quoted 1 line

GCC < 3.4.x (We use GCC 3.3.3 in our ELDK).

Unfortunately gcc 3.4.x produces faster code for PPC. We compile U-Boot with the eldk compiler and everything else with gcc-3.4.3 (buildroot toolchain).

IIRC, the difference was about >10-15% for parsing mpeg streams.

I've compiled U-Boot & Kernel with 3.4.2... the only thing that seems to fail in this process (obscurely) is hello_world, whereas the rest of the tree seems quite happy to compile *without* error/warning !

Granted.. U-Boot doesn't currently actually boot on my board, but, /that's/ just a matter of time/proffering sacrifice to the gods of SDRAM-UPM configuration. Easy !

--

Bryan

#4 lore raw
Quoted 2 lines

tree seems quite happy to compile *without* error/warning ! Granted.. U-Boot doesn't currently actually boot on my board, but,

That's my experience too. But time is not only an issue on the board itself :( It's on my todo list though...

Signature · 12 lines
  greetz, marc
That's your plan? Wile E. Coyote would come up with a better plan
than that!
	Crichton - Throne for a Loss
scorpius 2.6.11 #1 Wed Mar 2 16:38:38 CET 2005 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050614/8a99f78f/attachment.pgp 
#5 lore raw
Quoted 6 lines
Quoted 2 lines

tree seems quite happy to compile *without* error/warning ! Granted.. U-Boot doesn't currently actually boot on my board, but,

That's my experience too. But time is not only an issue on the board itself :( It's on my todo list though...

Most of the "warnings" I was referring to are from the linuxppc-2.4_devel_* kernel from the FTP site. U-Boot compiled cleanly compared to this.

#6 lore raw
Quoted 3 lines

Most of the "warnings" I was referring to are from the linuxppc-2.4_devel_* kernel from the FTP site. U-Boot compiled cleanly compared to this.

I'm using the linux.org kernel and it compiles cleanly. I seem to remember some warnings in a transition from one version to another, but I cannot remember what the compiler versions were.

I've been picking up the stable ones since 2.4.21 (...-2.4.31) for our systems.

Signature · 11 lines
  greetz, marc
One Mippippippi... Two Mippippippi...
	D'Argo - Through the Looking Glass
scorpius 2.6.11 #1 Wed Mar 2 16:38:38 CET 2005 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050614/dffdc5e3/attachment.pgp 
#7 lore raw
In reply to Allen Curtis
Quoted 3 lines · Allen Curtis

Most of the "warnings" I was referring to are from the linuxppc-2.4_devel_* kernel from the FTP site. U-Boot compiled cleanly compared to this.

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Detlef

Signature · 2 lines
Detlef Vollmann   vollmann engineering gmbh
Linux and C++ for Embedded Systems    http://www.vollmann.ch/
#8 lore raw
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

Signature · 12 lines
  greetz, marc
You honestly believe I could find you appealing? I mean, you're so,
so, blue!
	Rygel - DNA Mad Scientist
scorpius 2.6.11 #1 Wed Mar 2 16:38:38 CET 2005 GNU/Linux
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050615/6eefa67b/attachment.pgp 
#9 lore raw
Quoted 7 lines · Marc Leeman
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

I had a quick

grep -rs attrib | grep unused | grep -v Binary

On my Kernel source tree... and assuming that unused is indeed incorrectly handled... or rather differently handled, between 3.3.x and 3.4.x ... you probably wouldn't notice the difference, unless you were using SCSI, or the 8390 driver on powerpc.

--

Bryan

#10 lore raw
In reply to Marc Leeman
Quoted 6 lines · Marc Leeman
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

Same here ;)

Compiling U-Boot (latest CVS) is no problem on gcc-3.4.3, as long, as you are not addressing ARM targets and of course it works!

For kernel compilation, you need at least kernel 2.4.28 or higher when using gcc 3.4.x - or some patches that fix these attribute issues (and other stuff, that changed)

Ciao,
Gerhard

Signature · 3 lines
Gerhard Jaeger <[email protected]>            
SYSGO AG                      Embedded and Real-Time Software
www.sysgo.com | www.elinos.com | www.pikeos.com | www.osek.de 
#11 lore raw
Quoted 10 lines · Gerhard Jaeger
Quoted 6 lines · Marc Leeman
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

Quoted 8 lines

Same here ;)

Compiling U-Boot (latest CVS) is no problem on gcc-3.4.3, as long, as you are not addressing ARM targets and of course it works!

For kernel compilation, you need at least kernel 2.4.28 or higher when using gcc 3.4.x - or some patches that fix these attribute issues (and other stuff, that changed)

Ah yes, someone (you?) already mentioned that on linuxppc-embedded.

I run 2.4.28-pre3 !

#12 lore raw
In reply to Gerhard Jaeger
Quoted 8 lines · Marc Leeman
Quoted 6 lines
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

Quoted 9 lines

Same here ;)

Compiling U-Boot (latest CVS) is no problem on gcc-3.4.3, as long, as you are not addressing ARM targets and of course it works!

For kernel compilation, you need at least kernel 2.4.28 or higher when using gcc 3.4.x - or some patches that fix these attribute issues (and other stuff, that changed)

The PPC devel version on the Denx FTP site is 2.4.25.

#13 lore raw
In reply to Marc Leeman
Quoted 5 lines · Marc Leeman
Quoted 3 lines

Warning! from gcc-3.3 to gcc-3.4 the handling of the attribute 'unused' changed. For that reason, compiling a linux-2.4 kernel with gcc-3.4 will break silently!

Euhm. I've been doing this for 5 months without any problem for PPC.

That is what "will break silently!" means.
I used a 3.4 compiler for several weeks, until I tracked down a problem I didn't notice before to the compiler version.

Actually, the ARM version of U-Boot (at least 1.1.2) has the same problem (in include/asm-arm/setup.h).

Detlef

Signature · 2 lines
Detlef Vollmann   vollmann engineering gmbh
Linux and C++ for Embedded Systems    http://www.vollmann.ch/
#14 lore raw
In reply to Marc Leeman
Quoted 6 lines
Quoted 1 line

GCC < 3.4.x (We use GCC 3.3.3 in our ELDK).

Unfortunately gcc 3.4.x produces faster code for PPC. We compile U-Boot with the eldk compiler and everything else with gcc-3.4.3 (buildroot toolchain).

I am handing this off to non-Linux people. A single toolchain is best.