Unrecognized option -massume-32bit-callers
A build with gcc 4.8.2 fails with this error:
gcc: error: unrecognized command line option '-massume-32bit-callers'
genoffsets: /dpool/export/home/mills/Downloads/code/illumos-gate/usr/src/tools/proto/root_sparc-nd/opt/onbld/bin/sparc/cw failed with status 1
This gcc option originates in Makefile.master, where it's defined this way:
This option is not recognized by recent versions of gcc. Is it even needed anymore? The symbol only appears in these files:
Removing the option from Makefile.master, but retaining the symbol, allows the build to proceed.
Updated by Rich Lowe about 6 years ago
Yes this is necessary. I implemented this because otherwise the implementation of system calls on SPARC will not work correctly.
The problem is described in #2757, which is very cumbersome to fix in the OS. (I have a large GCC branch that doesn't work properly, but works nearly properly that you could play with if you wanted. iirc the next step would be to fix every system call to properly treat its arguments).
Updated by Gary Mills about 6 years ago
Okay, it's still necessary. Can we ask the GNU people again to upstream the necessary code in gcc? Otherwise, we'll need to keep on patching the compiler. I don't suppose there's another solution, like post-processing or a macro. With the very limited interest in illumos on SPARC, I suppose we should take the easiest path, or it'll never get done.