On Wed, Feb 14, 2007 at 06:46:43PM -0800, DEEPAK BHATIA wrote:

> When we do a dmake all in the directory we get the following compilation 
> messages
> 
> 1. /export/home/open_solaris/porting/usr/src/cmd/sgs/tools/i386/sgsmsg -i 
> ........................./common/ldd.msg
> 2. 
> /export/home/open_solaris/porting/usr/src/tools/proto/opt/onbld/bin/i386/cw 
> -_gcc -O ....................... -c  msg.c
> 3. /opt/SUNWspro/bin/cc -O............... -c msg.c
> 4. cw -_gcc -O..............................-c ../common/ldd.c
> 5.  /opt/SUNWspro/bin/cc.................... -c ../common/ldd.c
> 
> I have put the __GNUC="";export __GNUC and __GNUC64="";export __GNUC64 
> options in the opensolaris.sh.
> 
> Why do msg.c and ldd.c get compiled twice ?

When you place __GNUC in the environment, gcc becomes the primary
compiler; that is, the one which generates the objects in your
workspace).  Studio becomes the shadow compiler; that is, the one
which is run but has its output discarded.  Both are run to ensure
that all code compiles without warnings with both compilers.  Without
__GNUC, the roles are reversed, but virtually all source files are
nevertheless compiled twice.

If you're targetting an architecture for which Studio doesn't exist or
just REALLY don't want to run Studio at all, consider the CW_NO_SHADOW
environment variable.  See usr/src/tools/cw/cw.c for the whole story.

-- 
Keith M Wesolowski              "Sir, we're surrounded!" 
FishWorks                       "Excellent; we can attack in any direction!" 
_______________________________________________
opensolaris-help mailing list
[email protected]

Reply via email to