Skip to contentSkip to conversation

Back to the future: which gcc for kernel 2.4.18 ?

Linux-ia64 Xavier Bru 4 participants 6 messages Jun 5, 2002 – Jun 14, 2002

lore
Share & tools
lore

Xavier Bru

author
#0 lore raw

Hello,

Building kernel 2.4.18 for ia64 with gcc version 2.96 20000731 , it seems that there is some problem with code generation in the ia64_log_rec_header_print() routine that prints MCA informations:
year appears to be 18002 :-)

Looking at the code with gdb, it seems that the generated code uses the f6 register without ininitializing:
...
0xe0000000044351f1 <ia64_log_rec_header_print+337>: xmpy.l f6=f6,f7
...

+BEGIN HARDWARE ERROR STATE AT MCA
SAL RECORD HEADER: Record buffer = e000000000007000, header size = 40 e000000000007000 00 00 00 00 98 70 c5 04 02 00 01 00 28 07 00 00 e000000000007010 48 04 14 00 05 06 02 20 50 6c 61 74 66 6f 72 6d e000000000007020 20 69 64 2d 20 4f 45 4d
Total record length = 1832
End of SAL RECORD HEADER
+Err Record ID: 0 SAL Rev: 0.02
+Time: 06/05/18002/ 14:04:48 Severity 1
XXXXX

I tried using gcc3 (gcc version 3.0.2 20010905), but I get an internal compiler error when I build the kernel.

smpboot.o smpboot.c
smpboot.c: In function `smp_callin':
smpboot.c:370: Internal compiler error in itanium_reorder, at config/ia64/ia64.c:5652 Please submit a full bug report,
with preprocessed source if appropriate.

Signature · 8 lines
 Sincères salutations.
_____________________________________________________________________
 
Xavier BRU                 BULL ISD/R&D/INTEL office:     FREC B1-422
tel : +33 (0)4 76 29 77 45                    http://www-frec.bull.fr
fax : +33 (0)4 76 29 77 70                 mailto:[email protected]
addr: BULL, 1 rue de Provence, BP 208, 38432 Echirolles Cedex, FRANCE
_____________________________________________________________________
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Xavier Bru

Xavier> Building kernel 2.4.18 for ia64 with gcc version 2.96 Xavier> 20000731 , it seems that there is some problem with code Xavier> generation in the ia64_log_rec_header_print() routine that Xavier> prints MCA informations: year appears to be 18002 :-)

Xavier> Looking at the code with gdb, it seems that the generated Xavier> code uses the f6 register without ininitializing: ... Xavier> 0xe0000000044351f1 <ia64_log_rec_header_print+337>: xmpy.l Xavier> f6ö,f7 ...

Yes, I just tried with gcc 2.96 and I see this too: f6 is used twice without being initialized anywhere in the routine.

Xavier> I tried using gcc3 (gcc version 3.0.2 20010905), but I get Xavier> an internal compiler error when I build the kernel.

Haven't tried 3.0.2, but gcc3.1 compiles the code fine and without the "f6-bug" (but this may be just luck, because gcc3.1 doesn't use xma at all for this routine).

Can you narrow down the bug and report it to the gcc folks? It would be good to know that gcc3.1 really gets it right (and doesn't just get lucky).

	--david
#2 lore raw
In reply to Xavier Bru
Quoted 6 lines

Building kernel 2.4.18 for ia64 with gcc version 2.96 20000731 , it seems that there is some problem with code generation in the ia64_log_rec_header_print() routine that prints MCA informations:
year appears to be 18002 :-)
Looking at the code with gdb, it seems that the generated code uses the f6 register without ininitializing:

I've tracked this down to a reload (register allocator) problem. It looks to be very rare, and it looks like it is still present in current gcc sources. However, I'm not sure about that at the moment, as there are many possible solutions, and it is possible someone implemented a non-obvious one. I'm continuing to look at this. I want to try to reproduce it with current gcc sources before I try to fix it.

Quoted 2 lines

I tried using gcc3 (gcc version 3.0.2 20010905), but I get an internal compiler error when I build the kernel.

I don't know what compiler you are refering to. That doesn't look like an FSF version number, and I don't know of any Red Hat compiler release with that version number.

In any case, gcc 3.0 for IA-64 is not very interesting. It wasn't adopted by anybody that I know of for various reasons, so it never got stress tested and is unlikely to be reliable. Use gcc 3.1 instead.

Jim

author
#3 lore raw
In reply to Xavier Bru

Hi Dave and Jim,

Thanks for your answers.

Unfortunately, I did not success in installing gcc 3.1 on the system.

We are using a RedHat 7.2 distibution. gcc3-3.0.1-3 RPM is part of the distibution and provides a /usr/bin/gcc3 binary distinct from the /usr/bin/gcc binary provided by gcc-2.96-101 RPM.

I downloaded:

http://ftp.dulug.duke.edu/pub/redhat/linux/rawhide/ia64/RedHat/RPMS/gcc-3.1-6.ia64.rpm
and tried to install with rpm command. I had to remove a lot of RPMs and got stuck with the message:

        rpmlib(PartialHardlinkSets) <= 4.0.4-1 is needed by gcc-3.1-6

Is there a clean way to do that for an unexperimented gcc user, in particular, can we have a gcc3.1 like installation that allows keeping the gcc2.96 ?

Thanks again for your help.
Xavier

Quoted 26 lines · Jim Wilson
Quoted 6 lines

Building kernel 2.4.18 for ia64 with gcc version 2.96 20000731 , it seems that there is some problem with code generation in the ia64_log_rec_header_print() routine that prints MCA informations:
year appears to be 18002 :-)
Looking at the code with gdb, it seems that the generated code uses the f6 register without ininitializing:

I've tracked this down to a reload (register allocator) problem. It looks to be very rare, and it looks like it is still present in current gcc sources. However, I'm not sure about that at the moment, as there are many possible solutions, and it is possible someone implemented a non-obvious one. I'm continuing to look at this. I want to try to reproduce it with current gcc sources before I try to fix it.

Quoted 2 lines

I tried using gcc3 (gcc version 3.0.2 20010905), but I get an internal compiler error when I build the kernel.

I don't know what compiler you are refering to. That doesn't look like an FSF version number, and I don't know of any Red Hat compiler release with that version number.

In any case, gcc 3.0 for IA-64 is not very interesting. It wasn't adopted by anybody that I know of for various reasons, so it never got stress tested and is unlikely to be reliable. Use gcc 3.1 instead.

Jim

#4 lore raw
In reply to Xavier Bru
Quoted 3 lines

We are using a RedHat 7.2 distibution. gcc3-3.0.1-3 RPM is part of the distibution and provides a /usr/bin/gcc3 binary distinct from the /usr/bin/gcc binary provided by gcc-2.96-101 RPM.

Seems to be some inconsistencies in the packaging then. A 3.0.1 RPM shouldn't comtain a 3.0.2 compiler. The RHL 7.2/IA-64 system I am using has a gcc3 compiler that identifies itself as 3.0.4-1. I don't know what RPM that came from as rpm isn't being cooperative. In any case, gcc 3.0 really isn't very interesting.

Quoted 4 lines

http://ftp.dulug.duke.edu/pub/redhat/linux/rawhide/ia64/RedHat/RPMS/gcc-3.1-6.ia64.rpm
and tried to install with rpm command. I had to remove a lot of RPMs and got stuck with the message:

       rpmlib(PartialHardlinkSets) <= 4.0.4-1 is needed by gcc-3.1-6

No idea. I've never used anything from Rawhide. I know that they sometimes change rpm in non-backwards compatible ways which make it difficult to use stuff from rawhide, but that doesn't really help you.

Quoted 3 lines

Is there a clean way to do that for an unexperimented gcc user, in particular, can we have a gcc3.1 like installation that allows keeping the gcc2.96 ?

I don't know much about how the RPM stuff works. That is the OS side of Red Hat, not the tools side of Red Hat. I'd suggest trying something like

        ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.1/gcc-3.1.tar.bz2

It shouldn't be too hard to build and install this. If this doesn't build the kernel OK, it will be fixed.

Jim

#5 lore raw

RE: [Linux-ia64] Back to the future: which gcc for kernel 2.4.18

In reply to Xavier Bru
Quoted 7 lines
Quoted 3 lines

Is there a clean way to do that for an unexperimented gcc user, in particular, can we have a gcc3.1 like installation that allows keeping the gcc2.96 ?

I'd suggest trying something like

       ftp://gcc.gnu.org/pub/gcc/releases/gcc-3.1/gcc-3.1.tar.bz2

It shouldn't be too hard to build and install this.

In fact, if you just accept the default configure, the gcc built from this tree will install into /usr/local and not step on the existing gcc (but watch your paths). You're also pretty much sure to end up needing a late-model binutils (the current gnu release is 2.12.1, I believe) as gcc3 will, depending on circumstances, emit some debugging stuff that the linker can't handle if it's not recent enough.