gcc 2.95 vs. 3.0

gcc 2.95 vs. 3.0

Post by cbbro.. » Thu, 28 Jun 2001 02:22:53





> > The Linux kernel is a fairly special case; it apparently has a fair
> > number of places where its behaviour depends on non-standard
> > behaviour of GCC 2.95.

> >> FYI: Kernel compiled with 3.0 is QUITE unstable -- after 3-4 hours
> >> of uptime it usually hangs, and DMA support, for example, doesn't
> >> work at all neither for my SB nor for my hdd.
> > Is it the fault of the GCC maintainers when their fixing bugs in
> > their compiler winds up breaking code that depended on those bugs?
> Please, could you point out few of those famous bugs that kernel code
> relies upon ?

See, for discussion of how precisely kernel and compiler have to
match:
- <http://kt.zork.net/kernel-traffic/kt20001010_88.html#4>
- <http://kt.zork.net/kernel-traffic/kt20010108_101.html#1>
- <http://kt.zork.net/kernel-traffic/kt20000814_80.html#9>
- <http://kt.zork.net/kernel-traffic/kt20000724_77.html#9>

Quote:> It's pretty easy to say something. Now try to prove your point.

Look at the kernel code, searching for references to specific compiler
versions.  There's quite a lot of code in there specifically written
to work around some [not elaborately documented] problems
with GCC.

# cd /usr/src/linux
# grep -i "gcc 2" */*.{c,h}
# grep -i "gcc 2" */*/*.{c,h}
# grep -i "gcc 2" */*/*/*.{c,h}

Just count all the references to specific behaviours of different GCC
versions.  There's LOTS of them.
--

http://vip.hex.net/~cbbrowne/advocacy.html
One man's constant is another man's variable.  -- Alan Perlis

 
 
 

gcc 2.95 vs. 3.0

Post by Bohdan Vlasyu » Thu, 28 Jun 2001 17:11:45



>> Please, could you point out few of those famous bugs that kernel code
>> relies upon ?
> See, for discussion of how precisely kernel and compiler have to
> match:

I see only words `many' `lot', but nothing exact. Could you find small
example ??

Quote:>> It's pretty easy to say something. Now try to prove your point.
> # cd /usr/src/linux
> # grep -i "gcc 2" */*.{c,h}
> # grep -i "gcc 2" */*/*.{c,h}
> # grep -i "gcc 2" */*/*/*.{c,h}
> Just count all the references to specific behaviours of different GCC
> versions.  There's LOTS of them.

That is at least unchecked.
let's see: [2.4.5]

[sorry for long lines]
10:46:19 /src/linux # grep 'gcc 2' -r -i drivers/ fs ipc/ init/ lib/
mm net/ kernel/ arch/i386/|wc -l
        22
10:46:36 /src/linux # echo;grep 'gcc 2' -r -i drivers/ fs ipc/ init/
lib/ mm net/ kernel/ arch/i386/|grep -vi 'gcc 2.[4567]'

drivers/net/dgrs.c:             barrier();              /* Gcc 2.95 needs this */
drivers/net/dgrs.c:             barrier();              /* gcc 2.95 needs this */
drivers/net/via-rhine.c:        - Urban Widmark: fix gcc 2.95.2 problem and
drivers/cdrom/aztcd.c:                  barrier();      /* Stop gcc 2.96 being smart */
arch/i386/math-emu/README:The emulator passes the "paranoia" tests (compiled with gcc 2.3.3 or
arch/i386/math-emu/get_address.c:      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register
arch/i386/math-emu/get_address.c:      /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register

That's it! 22 references to odd compiler behavior. Only 7 references
to more or less recent compiler versions -- 2.8+. Is it `LOTS' ??

 
 
 

1. gcc 2.95 vs. 3.0

If the answer to all the following questions is RTFM, please point me
at the right docs...  otherwise:

I remember when gcc 2.96 came out, it wasn't binary compatible with
either 2.95 or 3.0.  Consequently, I stayed back with 2.95.  Now that
3.0 is out, what compatibility issues exist?  If it is compatible all
is well, but if it isn't:

Is there a clear upgrade path?  I'm running Debian unstable; is there
a concern about some libraries being compiled with 3.0 and some not?
--
Joseph J. Pfeiffer, Jr., Ph.D.       Phone -- (505) 646-1605
Department of Computer Science       FAX   -- (505) 646-1002
New Mexico State University          http://www.cs.nmsu.edu/~pfeiffer
SWNMRSEF:  http://www.nmsu.edu/~scifair

2. need color-xterm for Solaris

3. gcc 2.95 or 3.0 needed for KDE

4. UltraSCSI CD-ROM Drive won't install LINUX right

5. gcc 2.95 vs 3.21 performance

6. chsh in nis environments?

7. Netscape+plugins=segfault?

8. g++ 2.95 and g++ 3.0 on same debian woody system ???

9. Kernel compile problem with (P)GCC 2.95