Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: -fstrict-calling-conventions


Direct system calls on SPARC systems pass the first 6 word-sized arguments in registers, according to the normal ABI calling conventions.  Thus, when a 32bit process makes a system call to a 64bit kernel, negative arguments are twos complement in the width of the 32bit v7 register, not the 64bit v9 register the kernel sees.  This, in effect, makes any integer argument from a 32bit process implicitly signed.  This option causes GCC to emit code which does any promotion of function arguments in the callee rather than the caller, to account for this and allow direct 32bit calls to continue to function (at the cost of some pessimization).  This is also how Studio, and GCC prior to 4.2 would have generated the code.


For observability reasons, it is important that local functions follow the ABI-specified calling conventions, regardless of the compilers opinions about performance.  This prevents the use of the GCC 'local' i386 convention, where arguments are passed in registers.

General changes

Support for cmn_err format specifiers