This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: IRIX 6.x issues


>From http://reality.sgi.com/ariel/freeware/gcc-2.8.1-notes.html



gcc 2.8.1 does not support the o32 (old 32 bit) ABI.

[From Jim Wilson] Gcc does not correctly pass/return structures which are
smaller than 16 bytes and which are not 8 bytes. The problem is very
involved and difficult to fix. It affects a number of other targets also,
but irix6 is affected the most, because it is a 64 bit target, and 4 byte
structures are common. The exact problem is that structures are being padded
at the wrong end, e.g. a 4 byte structure is loaded into the lower 4 bytes
of the register when it should be loaded into the upper 4 bytes of the
register. 

Gcc is consistent with itself, but not consistent with the SGI C compiler
[and the SGI supplied runtime libraries], so the only failures that can
happen are when there are library functions that take/return such
structures. There are very few such library functions. I can only recall
seeing two of them: inet_dtoa, and semctl. 

A possible workaround: if you have a program that calls inet_dtoa or semctl,
you may compile it with gcc -mabi=64 



> -----Original Message-----
> From:	Martin Knoblauch [SMTP:knobi@rocketmail.com]
> Sent:	Thursday, 20 August 1998 19:26
> To:	Tor Arntsen; egcs@cygnus.com
> Subject:	Re: IRIX 6.x issues
> 
> Tor,
> 
>  no comment on the mips4 issue. I was not aware of
> it, but then my good old Indy is 32-bit anyway :-)
> 
>  I can imagine one way to make egcs produce o32 code
> under IRIX-6.x. Configure it for mips-sgi-irix5.3 and
> "--use-gas" (you also need gnu-as build for mips-sgi-irix5.3).
> This was they way I could make 2.7.2.x work on IRIX-6.x.
> Hint: "setenv SGI_ABI "-32"" when you build gnu-as and
> bootstrap egcs.
> 
>  I am not totally sure why o32 support was removed from
> gcc-2.8.x/egcs for IRIX-6.x. Maybe someone else can
> comment on it.
> 
> Martin
> ===
> ------------------------------------------------------
> Martin Knoblauch
> email: knobi@knobisoft.de or knobi@rocketmail.com
> www:   http://www.knobisoft.de
> 
> 
> 
> 
> 
> 
> 
> ---Tor Arntsen <tor@spacetec.no> wrote:
> >
> > I have successfully built 980816 on IRIX 6.2 with the 6.2 (not
> MIPSPro)
> > compiler[1].
> > 
> > There are a couple of things about egcs and IRIX 6.x I hope somebody
> has 
> > some time to comment on (in the meantime I'm looking at the source :-)
> > 
> > 1. The mabi=32 format (o32 in SGI terminology) is not supported
> > 2. The mabi=64 format does not support mips3 (even when -mips3 is
> specified
> >    it generates mips4)
> > 
> > The first is a half-killer for me.  The second is a full-killer,
> because 
> > it means that egcs cannot be used to create 64-bit applications on 
> > Challenge-L/XL servers, as they use r4400 chips (mips4 is
> r5000/8000/10000).
> > Or, rather, they can be created but they cannot be executed.
> > 
> > Could somebody comment on how hard it would be to fix these?  So far
> I've
> > seen code and comments in gcc/config/mips.c that disables mabi=32. 
> Looks
> > like it's just not there yet?  It does generate mabi=32 code on IRIX
> 5.3 
> > I'm sure, so naively one could think it should be all there
> somewhere..
> > (gcc 2.7.2 generates it ok on 6.2 too)
> > 
> > Equally naively one could think it should be possible to do mabi=64
> with
> > mips3 code, as it can do mips3 for n32.  But then again it's a
> different
> > format and the reality is probably not quite that simple I guess..
> > 
> > Thanks for your time,
> > Tor
> > --
> > [1] PS, here's one for the FAQ or maybe the build instructions: 
> > To bootstrap with the SGI 6.2 compilers (not the MIPSPro 7.x
> compilers)
> > you should do something like:
> > CC="cc -o32" CFLAGS="" ../configure
> > 
> > The default is to bootstrap the first stage with cc -n32, and that is
> > just plain broken on the 6.2 compilers (they are good -o32 compilers
> though).
> > This results in a broken stage1/xgcc which then miscompiles cpp, and
> boom.
> > The above configure command works fine.
> > 
> 
> _________________________________________________________
> DO YOU YAHOO!?
> Get your free @yahoo.com address at http://mail.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]