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

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.master
          +++ new/usr/src/Makefile.master
↓ open down ↓ 476 lines elided ↑ open up ↑
 477  477  # Sun Studio produces broken userland code when saving arguments.
 478  478  $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS)
 479  479  
 480  480  CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT)
 481  481  CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT)
 482  482  CTF_FLAGS       = $(CTF_FLAGS_32)
 483  483  
 484  484  #
 485  485  # Flags used with genoffsets
 486  486  #
 487      -GOFLAGS = -_noecho \
 488      -        $(CALLSYMS) \
 489      -        $(CDWARFSTR)
      487 +GOFLAGS = $(CALLSYMS) $(CDWARFSTR)
 490  488  
 491  489  OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 492      -        $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
      490 +        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
 493  491  
 494  492  OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 495      -        $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
      493 +        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 496  494  
 497  495  #
 498  496  # tradeoff time for space (smaller is better)
 499  497  #
 500  498  sparc_SPACEFLAG         = -xspace -W0,-Lt
 501  499  sparcv9_SPACEFLAG       = -xspace -W0,-Lt
 502  500  i386_SPACEFLAG          = -xspace
 503  501  amd64_SPACEFLAG         =
 504  502  
 505  503  SPACEFLAG               = $($(MACH)_SPACEFLAG)
↓ open down ↓ 268 lines elided ↑ open up ↑
 774  772  # Define native compilation macros
 775  773  #
 776  774  
 777  775  # Base directory where compilers are loaded.
 778  776  # Defined here so it can be overridden by developer.
 779  777  #
 780  778  SPRO_ROOT=              $(BUILD_TOOLS)/SUNWspro
 781  779  SPRO_VROOT=             $(SPRO_ROOT)/SS12
 782  780  GNU_ROOT=               /usr
 783  781  
      782 +$(__GNUC)PRIMARY_CC=    gcc4,$(GCC_ROOT)/bin/gcc,gnu
      783 +$(__SUNC)PRIMARY_CC=    studio12,$(SPRO_VROOT)/bin/cc,sun
      784 +$(__GNUC)PRIMARY_CCC=   gcc4,$(GCC_ROOT)/bin/g++,gnu
      785 +$(__SUNC)PRIMARY_CCC=   studio12,$(SPRO_VROOT)/bin/CC,sun
      786 +
      787 +CW_CC_COMPILERS=        $(PRIMARY_CC:%=--primary %) $(SHADOW_CCS:%=--shadow %)
      788 +CW_CCC_COMPILERS=       $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %)
      789 +
      790 +
 784  791  # Till SS12u1 formally becomes the NV CBE, LINT is hard
 785  792  # coded to be picked up from the $SPRO_ROOT/sunstudio12.1/
 786  793  # location. Impacted variables are sparc_LINT, sparcv9_LINT,
 787  794  # i386_LINT, amd64_LINT.
 788  795  # Reset them when SS12u1 is rolled out.
 789  796  #
 790  797  
 791  798  # Specify platform compiler versions for languages
 792  799  # that we use (currently only c and c++).
 793  800  #
 794      -sparc_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 795      -$(__GNUC)sparc_CC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 796      -sparc_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 797      -$(__GNUC)sparc_CCC=     $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
      801 +CW=                     $(ONBLD_TOOLS)/bin/$(MACH)/cw
      802 +
      803 +sparc_CC=               $(CW) $(CW_CC_COMPILERS) --
      804 +sparc_CCC=              $(CW) -C $(CW_CCC_COMPILERS) --
 798  805  sparc_CPP=              /usr/ccs/lib/cpp
 799  806  sparc_AS=               /usr/ccs/bin/as -xregsym=no
 800  807  sparc_LD=               /usr/ccs/bin/ld
 801  808  sparc_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
 802  809  
 803      -sparcv9_CC=             $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 804      -$(__GNUC64)sparcv9_CC=  $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 805      -sparcv9_CCC=            $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 806      -$(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
      810 +sparcv9_CC=             $(CW) $(CW_CC_COMPILERS) --
      811 +sparcv9_CCC=            $(CW) -C $(CW_CCC_COMPILERS) --
 807  812  sparcv9_CPP=            /usr/ccs/lib/cpp
 808  813  sparcv9_AS=             /usr/ccs/bin/as -xregsym=no
 809  814  sparcv9_LD=             /usr/ccs/bin/ld
 810  815  sparcv9_LINT=           $(SPRO_ROOT)/sunstudio12.1/bin/lint
 811  816  
 812      -i386_CC=                $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 813      -$(__GNUC)i386_CC=       $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 814      -i386_CCC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 815      -$(__GNUC)i386_CCC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
      817 +i386_CC=                $(CW) $(CW_CC_COMPILERS) --
      818 +i386_CCC=               $(CW) -C $(CW_CCC_COMPILERS) --
 816  819  i386_CPP=               /usr/ccs/lib/cpp
 817  820  i386_AS=                /usr/ccs/bin/as
 818  821  $(__GNUC)i386_AS=       $(ONBLD_TOOLS)/bin/$(MACH)/aw
 819  822  i386_LD=                /usr/ccs/bin/ld
 820  823  i386_LINT=              $(SPRO_ROOT)/sunstudio12.1/bin/lint
 821  824  
 822      -amd64_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 823      -$(__GNUC64)amd64_CC=    $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 824      -amd64_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 825      -$(__GNUC64)amd64_CCC=   $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
      825 +amd64_CC=               $(CW) $(CW_CC_COMPILERS) --
      826 +amd64_CCC=              $(CW) -C $(CW_CCC_COMPILERS) --
 826  827  amd64_CPP=              /usr/ccs/lib/cpp
 827  828  amd64_AS=               $(ONBLD_TOOLS)/bin/$(MACH)/aw
 828  829  amd64_LD=               /usr/ccs/bin/ld
 829  830  amd64_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
 830  831  
 831  832  NATIVECC=               $($(NATIVE_MACH)_CC)
 832  833  NATIVECCC=              $($(NATIVE_MACH)_CCC)
 833  834  NATIVECPP=              $($(NATIVE_MACH)_CPP)
 834  835  NATIVEAS=               $($(NATIVE_MACH)_AS)
 835  836  NATIVELD=               $($(NATIVE_MACH)_LD)
↓ open down ↓ 1 lines elided ↑ open up ↑
 837  838  
 838  839  #
 839  840  # Makefile.master.64 overrides these settings
 840  841  #
 841  842  CC=                     $(NATIVECC)
 842  843  CCC=                    $(NATIVECCC)
 843  844  CPP=                    $(NATIVECPP)
 844  845  AS=                     $(NATIVEAS)
 845  846  LD=                     $(NATIVELD)
 846  847  LINT=                   $(NATIVELINT)
 847      -
 848      -# The real compilers used for this build
 849      -CW_CC_CMD=              $(CC) -_compiler
 850      -CW_CCC_CMD=             $(CCC) -_compiler
 851      -REAL_CC=                $(CW_CC_CMD:sh)
 852      -REAL_CCC=               $(CW_CCC_CMD:sh)
 853  848  
 854  849  # Pass -Y flag to cpp (method of which is release-dependent)
 855  850  CCYFLAG=                -Y I,
 856  851  
 857  852  BDIRECT=        -Bdirect
 858  853  BDYNAMIC=       -Bdynamic
 859  854  BLOCAL=         -Blocal
 860  855  BNODIRECT=      -Bnodirect
 861  856  BREDUCE=        -Breduce
 862  857  BSTATIC=        -Bstatic
↓ open down ↓ 322 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX