From banz@umbc.edu Mon Sep 21 22:13:07 1998 Date: Mon, 21 Sep 1998 22:13:05 -0400 From: Robert Banz To: squire@gl.umbc.edu Subject: Re: [Req #17906] c89 why different? On Mon, 21 Sep 1998 squire@gl.umbc.edu wrote: > My students are thinking I am more crazy than I actually am. > > On gl=umbc8 c89 -g3 -O4 xxx.c works > On gl=umbc9 c89 -g3 -O4 xxx.c does not work, says -O4 is ilegal > > besides that, in gdb a.out the addresses are different > for x/200xw 0x10000aa0 umbc9 vs x/200xw 0x400980 umbc 8 > > How can you expect us to teach how to use debugger when we can > not give examples that work on all the gl machines ??? The compilers on umbc8 & umbc9 are the same version, however, the OS's are different. We can't do anything about it, unfortunatly, because Irix 6.2 won't run on umbc9 & Irix 6.4 won't run on anything but umbc9. With the OS rev change, SGI made the default object file format "-n32" on the 6.4 machines, but it's "-o32" on the others. You can have them always commpile with either off those options, and they'll get the same compilers. BTW, the optimization levels are handled differently with the newer compilers, when ran in -n32 mode which umbc9 does by default, which is why you're getting the -O4 message. The basic difference between the object file formats are -o32 32bit ptrs 32bit ints -n32 32bit ptrs 64bit ints -n64 64bit ptrs 64bit ints (hint: don't use -n64 anyhwere, it won't work on the workstations -- they're only 32 bit machines :) ) -n32 is the good one to use. The backend compilers for it are *really good* -- the backend that generates the -o32 code and does the optimizations hadn't been developed on for a couple years by SGI. rob