Re: gcc -O2 on alpha miscompiles ifupdown?
I just installed and tried that compiler and it didn't work either, but
gave a real error, or atleast what looks like one, instead of just
segfaulting. This is what I got:
gcc -D__KERNEL__ -I/usr/src/linux-2.4.0/include -Wall -Wstrict-prototypes -
O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mno-fp-regs -ffixed-8 -
mcpu=ev4 -Wa,-mev6 -DMODULE -DEXPORT_SYMTAB -c DAC960.c
DAC960.c: In function `DAC960_V2_EnableMemoryMailboxInterface':
DAC960.c:976: internal error--unrecognizable insn:
(insn 1189 531 528 (set (reg:DI 2 $2)
(plus:DI (reg:DI 30 $30)
(const_int 4398046511104 [0x40000000000]))) -1 (nil)
(nil))
cpp0: output pipe has been closed
make[2]: *** [DAC960.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.0/drivers/block'
make[1]: *** [_modsubdir_block] Error 2
make[1]: Leaving directory `/usr/src/linux-2.4.0/drivers'
make: *** [_mod_drivers] Error 2
tinman:/usr/src/linux-2.4.0# gcc -v
Reading specs from /usr/lib/gcc-lib/alpha-linux/2.95.3/specs
gcc version 2.95.3 20001220 (prerelease)
tinman:/usr/src/linux-2.4.0#
> Please check with a gcc-2.95.3 prerelease compiled by Chris
> (http://master.debian.org/~doko/alpha) or with the test release
> currently in incoming.
>
> Current gcc snapshots (2.97) can be found in experimental (currently in
> incoming).
>
> Jim Crilly writes:
> > > Anthony Towns (aj@azure.humbug.org.au) wrote:
> > >
> > > > Like the subject says; if I build ifupdown (0.6.4-1) on alpha
with -O2
> > > > it breaks, if I build it with -O0, it's fine. With -O2, trying to
trace
> > > > what's going on with gdb doesn't seem to work (it jumps all over
the
> > > > place, fairly meaninglessly).
> > > >
> > > > In theory, ifupdown should just be a fairly normal ANSI C program.
Most
> > > > of the data structures aren't too complicated, and at worse there
are
> > > > a few function pointers. I think everything's fully typed, and
there
> > > > shouldn't be any weird casting. There was some buggy realloc's in
the
> > > > past (reallocing 4 bytes, instead of 4*sizeof(obj) bytes, mainly),
> > > > but I believe they're all gone.
> > >
> > > I haven't looked at this (yet?), but I would guess it to be more bugs
> > > in gcc 2.95 we are using. If you look at the gcc 2.96 changelog
you'll
> > > see there are quite a few bug fixes, a lot of them on Alpha. We've
> > > been plauged with bad gcc optimization on Alpha for about as long as
I
> > > can remember.
> > >
> > > If no one knows for sure, I may have time in the next couple of days
> > > to play with it and see. Chris Chimelis (chris@debian.org) is the one
> > > to talk to about gcc bugs on Alpha. I would say either don't use -O2
> > > (duh) or use a different gcc (probably not gonna happen anytime
soon).
> > >
> > > Ron
> >
> > Just wanted to note I see a similar problem compiling the DAC960
driver in
> > the 2.4 (2.2.X one works fine) kernel, with -O2 gcc segfaults, with -
O0 it
> > works.
> >
> > Sorry for not giving more information but my Alpha's at work right now
and
> > I'm not, I can send more on Monday if anyone want.
>
>
> --
> To UNSUBSCRIBE, email to debian-alpha-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>
Reply to: