Need help mapping SGI->GCC compiler options

John H. Chauvin jchauvin@netcom.com
Fri Sep 10 08:24:00 GMT 1999


I am new to Linux and C programming and have been given the task of
porting a C program from our Silicon Graphics (SGI) workstation to
Linux.  I would appreciate some help in trying to map the SGI compiler
options to gcc.

Here are the SGI compiler options. Any idea what the equivalent gcc
compiler options are?

Thanks,

John C.

   -cckr    The traditional K&R/Version7 C with SGI (and  some ANSI/ISO-C-
            like) extensions, including function prototypes, void, void*.
            The symbols _MIPS_FPSET, _MIPS_ISA, _MIPS_SIM, _MIPS_SZINT,
            _MIPS_SZLONG, _MIPS_SZPTR, __EXTENSIONS__, LANGUAGE_C,
            _LANGUAGE_C, __INLINE_INTRINSICS, sgi, __sgi, unix, mips,
            host_mips, __unix, __host_mips, _SVR4_SOURCE, _MODERN_C,
            _SGI_SOURCE, __DSO__, SYSTYPE_SVR4, _SYSTYPE_SVR4, _LONGLONG,
            __mips, _MIPSEB, MIPSEB, and _CFE are defined to the
            preprocessor.

   -float
          Causes the compiler to use single-precision floating-point whenever
          the programmer specified float (except in function arguments).  For
          example, in

               float a; int b; float c;
               c = a * b;

          a and b are promoted to double and a double-precision multiply is
          done, followed by a conversion back to single-precision for the
          assignment to c.

  -prototypes
          causes prototype diagnostic messages to be issued in -cckr mode.  By
          default, diagnostics about function prototype declarations are
          provided in -ansi, -ansiposix and -xansi modes, while such
          diagnostics is suppressed in -cckr mode.  Code generation is not
          affected by the option.

          Use of this option is recommended in combination with the -fullwarn
          option.

--
John H. Chauvin jchauvin@netcom.COM
Netcom - Online Communication Services San Jose, CA


More information about the Gcc-help mailing list