Print this page
cw: give cw(1onbld) a new interface allowing for multiple arbitrary shadows

@@ -482,19 +482,17 @@
 CTF_FLAGS       = $(CTF_FLAGS_32)
 # Flags used with genoffsets
-GOFLAGS = -_noecho \
-        $(CALLSYMS) \
-        $(CDWARFSTR)
-        $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
+        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
-        $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
+        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 # tradeoff time for space (smaller is better)
 sparc_SPACEFLAG         = -xspace -W0,-Lt

@@ -779,52 +777,55 @@
 SPRO_ROOT=              $(BUILD_TOOLS)/SUNWspro
 SPRO_VROOT=             $(SPRO_ROOT)/SS12
 GNU_ROOT=               /usr
+$(__GNUC)PRIMARY_CC=    gcc4,$(GCC_ROOT)/bin/gcc,gnu
+$(__SUNC)PRIMARY_CC=    studio12,$(SPRO_VROOT)/bin/cc,sun
+$(__GNUC)PRIMARY_CCC=   gcc4,$(GCC_ROOT)/bin/g++,gnu
+$(__SUNC)PRIMARY_CCC=   studio12,$(SPRO_VROOT)/bin/CC,sun
+CW_CC_COMPILERS=        $(PRIMARY_CC:%=--primary %) $(SHADOW_CCS:%=--shadow %)
+CW_CCC_COMPILERS=       $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %)
 # Till SS12u1 formally becomes the NV CBE, LINT is hard
 # coded to be picked up from the $SPRO_ROOT/sunstudio12.1/
 # location. Impacted variables are sparc_LINT, sparcv9_LINT,
 # i386_LINT, amd64_LINT.
 # Reset them when SS12u1 is rolled out.
 # Specify platform compiler versions for languages
 # that we use (currently only c and c++).
-sparc_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC)sparc_CC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-sparc_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC)sparc_CCC=     $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
+CW=                     $(ONBLD_TOOLS)/bin/$(MACH)/cw
+sparc_CC=               $(CW) $(CW_CC_COMPILERS) --
+sparc_CCC=              $(CW) -C $(CW_CCC_COMPILERS) --
 sparc_CPP=              /usr/ccs/lib/cpp
 sparc_AS=               /usr/ccs/bin/as -xregsym=no
 sparc_LD=               /usr/ccs/bin/ld
 sparc_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
-sparcv9_CC=             $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC64)sparcv9_CC=  $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-sparcv9_CCC=            $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
+sparcv9_CC=             $(CW) $(CW_CC_COMPILERS) --
+sparcv9_CCC=            $(CW) -C $(CW_CCC_COMPILERS) --
 sparcv9_CPP=            /usr/ccs/lib/cpp
 sparcv9_AS=             /usr/ccs/bin/as -xregsym=no
 sparcv9_LD=             /usr/ccs/bin/ld
 sparcv9_LINT=           $(SPRO_ROOT)/sunstudio12.1/bin/lint
-i386_CC=                $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC)i386_CC=       $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-i386_CCC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC)i386_CCC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
+i386_CC=                $(CW) $(CW_CC_COMPILERS) --
+i386_CCC=               $(CW) -C $(CW_CCC_COMPILERS) --
 i386_CPP=               /usr/ccs/lib/cpp
 i386_AS=                /usr/ccs/bin/as
 $(__GNUC)i386_AS=       $(ONBLD_TOOLS)/bin/$(MACH)/aw
 i386_LD=                /usr/ccs/bin/ld
 i386_LINT=              $(SPRO_ROOT)/sunstudio12.1/bin/lint
-amd64_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
-$(__GNUC64)amd64_CC=    $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
-amd64_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
-$(__GNUC64)amd64_CCC=   $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
+amd64_CC=               $(CW) $(CW_CC_COMPILERS) --
+amd64_CCC=              $(CW) -C $(CW_CCC_COMPILERS) --
 amd64_CPP=              /usr/ccs/lib/cpp
 amd64_AS=               $(ONBLD_TOOLS)/bin/$(MACH)/aw
 amd64_LD=               /usr/ccs/bin/ld
 amd64_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint

@@ -843,16 +844,10 @@
 CPP=                    $(NATIVECPP)
 AS=                     $(NATIVEAS)
 LD=                     $(NATIVELD)
 LINT=                   $(NATIVELINT)
-# The real compilers used for this build
-CW_CC_CMD=              $(CC) -_compiler
-CW_CCC_CMD=             $(CCC) -_compiler
-REAL_CC=                $(CW_CC_CMD:sh)
-REAL_CCC=               $(CW_CCC_CMD:sh)
 # Pass -Y flag to cpp (method of which is release-dependent)
 CCYFLAG=                -Y I,
 BDIRECT=        -Bdirect
 BDYNAMIC=       -Bdynamic