-->

Previous | Table of Contents | Next

Page 191

i386v, meaning to compile for an 80386 running System V, then you would specify _b i386v to run that cross compiler.
When you do not specify _b, it normally means to compile for the same type of machine that you are using.
_V version The argument version specifies which version of GNU CC to run. This is useful when multiple versions are installed. For example, version might be 2.0, meaning to run GNU CC version 2.0.
The default version, when you do not specify _V, is controlled by the way GNU CC is installed. Normally, it will be a version that is recommended for general use.

MACHINE-DEPENDENT OPTIONS

Each of the target machine types can have its own special options, starting with _m, to choose among various hardware models or configurations—for example, 68010 versus 68020, floating coprocessor or none. A single installed version of the compiler can compile for any model or configuration, according to the options specified.

Some configurations of the compiler also support additional special options, usually for command-line compatibility with other compilers on the same platform.

These are the _m options defined for the 68000 series:

_m68000 Generate output for a 68000. This is the default when the compiler is configured for 68000-
_mc68000 based systems.
_m68020 Generate output for a 68020 (rather than a 68000). This is the default when the compiler is
_mc68020 configured for 68020-based systems.
_m68881 Generate output containing 68881 instructions for floating point. This is the default for most 68020-based systems unless _nfp was specified when the compiler was configured.
_m68030 Generate output for a 68030. This is the default when the compiler is configured for 68030-based systems.
_m68040 Generate output for a 68040. This is the default when the compiler is configured for 68040-based systems.
_m68020_40 Generate output for a 68040, without using any of the new instructions. This results in code which can run relatively efficiently on either a 68020/68881 or a 68030 or a 68040.
_mfpa Generate output containing Sun FPA instructions for floating point.
_msoft_float Generate output containing library calls for floating point.
WARNING
The requisite libraries are not part of GNU CC. Normally, the facilities of the machine's usual C compiler are used, but this can't be done directly in cross-compilation. You must make your own arrangements to provide suitable library functions for cross-compilation.
_mshort Consider type int to be 16 bits wide, like short int.
_mnobitfield Do not use the bit-field instructions. _m68000 implies _mnobitfield.
_mbitfield Do use the bit-field instructions. _m68020 implies _mbitfield. This is the default if you use the unmodified sources.
_mrtd Use a different function-calling convention, in which functions that take a fixed number of arguments return with the rtd instruction, which pops their arguments while returning. This saves one instruction in the caller since there is no need to pop the arguments there. This calling convention is incompatible with the one normally used on UNIX, so you cannot use it if you need to call libraries compiled with the UNIX compiler.

Page 192

Also, you must provide function prototypes for all functions that take variable numbers of arguments (including printf ); otherwise, incorrect code will be generated for calls to those functions.
In addition, seriously incorrect code will result if you call a function with too many arguments. (Normally, extra arguments are harmlessly ignored.) The rtd instruction is supported by the 68010 and 68020 processors, but not by the 68000.

These _m options are defined for the VAX:

_munix

Do not output certain jump instructions (aobleq and so on) that the UNIX assembler for the VAX cannot handle across long ranges.
_mgnu Do output those jump instructions, on the assumption that you will assemble with the GNU assembler.
_mg Output code for g-format floating-point numbers instead of d-format.

These _m switches are supported on the SPARC:

_mfpu Generate output containing floating-point instructions. This is the default.
_mhard_float
_mno_fpu Generate output containing library calls for floating point.
_msoft_float
WARNING
There is no GNU floating-point library for SPARC. Normally, the facilities of the machine's usual C compiler are used, but this cannot be done directly in cross-compilation. You must make your own arrangements to provide suitable library functions for cross-compilation.
_msoft_float Changes the calling convention in the output file; therefore, it is only useful if you compile all of a program with this option.
_mno_epilogue With _mepilogue (the default), the compiler always emits code for function exit at the end of
_mepilogue each function. Any function exit in the middle of the function (such as a return statement in C) will generate a jump to the exit code at the end of the function. With _mno_epilogue, the compiler tries to emit exit code inline at every function exit.
_mno_v8 These three options select variations on the SPARC architecture. By default (unless specifically
_mv8
msparclite
configured for the Fujitsu SPARClite), gcc generates code for the v7 variant of the SPARC architecture.
_mv8 will give you SPARC v8 code. The only difference from v7 code is that the compiler emits the integer multiply and integer divide instructions that exist in SPARC v8 but not in SPARC v7.
_msparclite will give you SPARClite code. This adds the integer multiply, integer divide step and scan (ffs) instructions that exist in SPARClite but not in SPARC v7.
_mcypress These two options select the processor for which the code is optimized.
_msupersparc With _mcypress (the default), the compiler optimizes code for the Cypress CY7C602 chip, as used in the SparcStation and SparcServer 3xx series. This is also appropriate for the older SparcStation 1, 2, IPX, and so on.
With _msupersparc the compiler optimizes code for the SuperSparc cpu, as used in the SparcStation 10, 1000, and 2000 series. This flag also enables use of the full SPARC v8 instruction set.

These _m options are defined for the Convex:

_mc1 Generate output for a C1. This is the default when the compiler is configured for a C1.
_mc2 Generate output for a C2. This is the default when the compiler is configured for a C2.

Previous | Table of Contents | Next