Questions about using gcc 2.8.1 on Irix 6.4

Erik Mouw J.A.K.Mouw@its.tudelft.nl
Fri Apr 21 02:50:00 GMT 2000


On Thu, 20 Apr 2000 15:04:06 -0400, Kathleen Langone wrote:
> I've got all necessary header files and libs installed(like the Irix 
> as..etc) and using gcc 2.8.1.

You might want to give the latest gcc-2.95.2 a shot. It really runs very
fine on IRIX, and its optimizer is on par with the SGI MipsPRO compilers
(kudos to the developers). I don't know if it's yet available from SGI
freeware, I adviced Ariel Faigon to make an inst-able package of it a
couple of months ago, but it turned out that he is no longer with SGI (SGI
freeware people: please package gcc-2.95.2). Anyway, compiling gcc-2.95.2
yourself is very easy, just follow the notes on the gcc website.

> And I'm trying to compile OpenGL programs.
> 1) I don't know where to override the CFLAGS define. And where the best 
> place to "globally" declare cc -> gcc?

Have you tried overriding them with environment variables? Using tcsh, try:

  setenv CC gcc
  setenv CFLAGS "-O2 -g"

Or add them to the make command line (this works for GNU make, never tried
it with IRIX make):

  make CC=gcc CFLAGS="-O2 -g"

The only problem I got compiling OpenGL programs with gcc is that libGLU
is a C++ library compiled with the SGI C++ compiler. Fortunately, SGI
released the source code for OpenGL, so you can get the sources from
http://oss.sgi.com/ and compile libGLU with gcc yourself.

> 2) What would be a good basic set of compile switches of gcc in the Irix 
> 6.4 environment?

"-Wall -O2 -g" will do in most cases.

> 3) It complaining about -mabi=32 support does not work yet... Am I missing 
> something in the installation? Or can the error go away w/ the correct set 
> of compile swicthes?

Correct, gcc doesn't support the O32 ABI. If you installed the gcc-2.8.1
from the SGI freeware CD, you could have read it in the release notes.
Doesn't matter, because the SGI MipsPRO compilers on IRIX 6.4 defaults to
the N32 ABI, and gcc does the same.

> 4) I'm not using gnu make? Is that a problem? I'm using the SGI make and 
> assembler(as).

I don't think so. For some packages GNU make is better, but in most cases
IRIX make will do the job. I always use GNU make, though.

Gcc always uses the native SGI assembler on IRIX 6.x platforms.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2783635  Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/





More information about the Gcc mailing list