Dan Mick writes:
> Roland Mainz wrote:
> > Hi!
> > 
> > ----
> > 
> > Does anyone know why "-fno-unit-at-a-time" is used for gcc in OS/Net
> > (http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/tools/cw/cw.c#510
> > just uses it without any comments... ;-( ) ?
> 
> I'm only guessing: functions and variables can get reordered or even 
> omitted.  There are bound to be consequences somewhere for that.

Actually, it does have comments.  The comments say this:

                                                /*
                                                 * For gcc-3.4.x at -O2 we
                                                 * need to disable optimizations
                                                 * that break ON.
                                                 */

This seems to date back to the 1.1 version of the file.  I suspect a
big reason for doing this is that unit-at-a-time causes the compiler
to generate non-standard calling sequences for static functions, and
that's likely to wreak havoc with dtrace.

Googling on "gcc unit-at-a-time" provides a lot of hits.  Maybe it'd
make a good domain name ...

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to