Print this page
9128 cw(1onbld) should be able to run multiple shadows
9129 file-locking tests shouldn't build multiple source files in one compiler invocation
9130 DTrace tst.gcc.d isn't useful
9132 cw(1onbld) shouldn't shadow pure preprocessing
Reviewed by: Andy Fiddaman <omnios@citrus-it.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/Makefile.master
          +++ new/usr/src/Makefile.master
↓ open down ↓ 481 lines elided ↑ open up ↑
 482  482  # Sun Studio produces broken userland code when saving arguments.
 483  483  $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS)
 484  484  
 485  485  CTF_FLAGS_32    = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT)
 486  486  CTF_FLAGS_64    = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT)
 487  487  CTF_FLAGS       = $(CTF_FLAGS_32)
 488  488  
 489  489  #
 490  490  # Flags used with genoffsets
 491  491  #
 492      -GOFLAGS = -_noecho \
 493      -        $(CALLSYMS) \
 494      -        $(CDWARFSTR)
      492 +GOFLAGS = $(CALLSYMS) $(CDWARFSTR)
 495  493  
 496  494  OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 497      -        $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
      495 +        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS) $(CPPFLAGS)
 498  496  
 499  497  OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \
 500      -        $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
      498 +        $(CW) --noecho $(CW_CC_COMPILERS) -- $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS)
 501  499  
 502  500  #
 503  501  # tradeoff time for space (smaller is better)
 504  502  #
 505  503  sparc_SPACEFLAG         = -xspace -W0,-Lt
 506  504  sparcv9_SPACEFLAG       = -xspace -W0,-Lt
 507  505  i386_SPACEFLAG          = -xspace
 508  506  amd64_SPACEFLAG         =
 509  507  
 510  508  SPACEFLAG               = $($(MACH)_SPACEFLAG)
↓ open down ↓ 175 lines elided ↑ open up ↑
 686  684  # LDLIBS32 and LDLIBS64 can be set in the environment to override the following
 687  685  # assignments.
 688  686  #
 689  687  # These environment settings make sure that no libraries are searched outside
 690  688  # of the local workspace proto area:
 691  689  #       LDLIBS32=-YP,$ROOT/lib:$ROOT/usr/lib
 692  690  #       LDLIBS64=-YP,$ROOT/lib/$MACH64:$ROOT/usr/lib/$MACH64
 693  691  #
 694  692  LDLIBS32 =      $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3)
 695  693  LDLIBS32 +=     $(ADJUNCT_PROTO:%=-L%/usr/lib -L%/lib)
 696      -LDLIBS.cmd =    $(LDLIBS32)
      694 +LDLIBS.cmd =    $(LDLIBS32)
 697  695  LDLIBS.lib =    $(LDLIBS32)
 698  696  
 699  697  LDLIBS64 =      $(ENVLDLIBS1:%=%/$(MACH64)) \
 700  698                  $(ENVLDLIBS2:%=%/$(MACH64)) \
 701  699                  $(ENVLDLIBS3:%=%/$(MACH64))
 702  700  LDLIBS64 +=     $(ADJUNCT_PROTO:%=-L%/usr/lib/$(MACH64) -L%/lib/$(MACH64))
 703  701  
 704  702  #
 705  703  # Define compilation macros.
 706  704  #
↓ open down ↓ 72 lines elided ↑ open up ↑
 779  777  # Define native compilation macros
 780  778  #
 781  779  
 782  780  # Base directory where compilers are loaded.
 783  781  # Defined here so it can be overridden by developer.
 784  782  #
 785  783  SPRO_ROOT=              $(BUILD_TOOLS)/SUNWspro
 786  784  SPRO_VROOT=             $(SPRO_ROOT)/SS12
 787  785  GNU_ROOT=               /usr
 788  786  
      787 +$(__GNUC)PRIMARY_CC=    gcc4,$(GNUC_ROOT)/bin/gcc,gnu
      788 +$(__SUNC)PRIMARY_CC=    studio12,$(SPRO_VROOT)/bin/cc,sun
      789 +$(__GNUC)PRIMARY_CCC=   gcc4,$(GNUC_ROOT)/bin/g++,gnu
      790 +$(__SUNC)PRIMARY_CCC=   studio12,$(SPRO_VROOT)/bin/CC,sun
      791 +
      792 +CW_CC_COMPILERS=        $(PRIMARY_CC:%=--primary %) $(SHADOW_CCS:%=--shadow %)
      793 +CW_CCC_COMPILERS=       $(PRIMARY_CCC:%=--primary %) $(SHADOW_CCCS:%=--shadow %)
      794 +
      795 +
 789  796  # Till SS12u1 formally becomes the NV CBE, LINT is hard
 790  797  # coded to be picked up from the $SPRO_ROOT/sunstudio12.1/
 791  798  # location. Impacted variables are sparc_LINT, sparcv9_LINT,
 792  799  # i386_LINT, amd64_LINT.
 793  800  # Reset them when SS12u1 is rolled out.
 794  801  #
 795  802  
 796  803  # Specify platform compiler versions for languages
 797  804  # that we use (currently only c and c++).
 798  805  #
 799      -sparc_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 800      -$(__GNUC)sparc_CC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 801      -sparc_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 802      -$(__GNUC)sparc_CCC=     $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
 803      -sparc_CPP=              /usr/ccs/lib/cpp
 804      -sparc_AS=               /usr/ccs/bin/as -xregsym=no
 805      -sparc_LD=               /usr/ccs/bin/ld
 806      -sparc_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
      806 +CW=                     $(ONBLD_TOOLS)/bin/$(MACH)/cw
 807  807  
 808      -sparcv9_CC=             $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 809      -$(__GNUC64)sparcv9_CC=  $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 810      -sparcv9_CCC=            $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 811      -$(__GNUC64)sparcv9_CCC= $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
 812      -sparcv9_CPP=            /usr/ccs/lib/cpp
 813      -sparcv9_AS=             /usr/ccs/bin/as -xregsym=no
 814      -sparcv9_LD=             /usr/ccs/bin/ld
 815      -sparcv9_LINT=           $(SPRO_ROOT)/sunstudio12.1/bin/lint
      808 +BUILD_CC=               $(CW) $(CW_CC_COMPILERS) --
      809 +BUILD_CCC=              $(CW) -C $(CW_CCC_COMPILERS) --
      810 +BUILD_CPP=              /usr/ccs/lib/cpp
      811 +BUILD_LD=               /usr/ccs/bin/ld
      812 +BUILD_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
 816  813  
 817      -i386_CC=                $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 818      -$(__GNUC)i386_CC=       $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 819      -i386_CCC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 820      -$(__GNUC)i386_CCC=      $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
 821      -i386_CPP=               /usr/ccs/lib/cpp
      814 +$(MACH)_CC=             $(BUILD_CC)
      815 +$(MACH)_CCC=            $(BUILD_CCC)
      816 +$(MACH)_CPP=            $(BUILD_CPP)
      817 +$(MACH)_LD=             $(BUILD_LD)
      818 +$(MACH)_LINT=           $(BUILD_LINT)
      819 +$(MACH64)_CC=           $(BUILD_CC)
      820 +$(MACH64)_CCC=          $(BUILD_CCC)
      821 +$(MACH64)_CPP=          $(BUILD_CPP)
      822 +$(MACH64)_LD=           $(BUILD_LD)
      823 +$(MACH64)_LINT=         $(BUILD_LINT)
      824 +
      825 +sparc_AS=               /usr/ccs/bin/as -xregsym=no
      826 +sparcv9_AS=             $($(MACH)_AS)
      827 +
 822  828  i386_AS=                /usr/ccs/bin/as
 823  829  $(__GNUC)i386_AS=       $(ONBLD_TOOLS)/bin/$(MACH)/aw
 824      -i386_LD=                /usr/ccs/bin/ld
 825      -i386_LINT=              $(SPRO_ROOT)/sunstudio12.1/bin/lint
 826      -
 827      -amd64_CC=               $(ONBLD_TOOLS)/bin/$(MACH)/cw -_cc
 828      -$(__GNUC64)amd64_CC=    $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc
 829      -amd64_CCC=              $(ONBLD_TOOLS)/bin/$(MACH)/cw -_CC
 830      -$(__GNUC64)amd64_CCC=   $(ONBLD_TOOLS)/bin/$(MACH)/cw -_g++
 831      -amd64_CPP=              /usr/ccs/lib/cpp
 832  830  amd64_AS=               $(ONBLD_TOOLS)/bin/$(MACH)/aw
 833      -amd64_LD=               /usr/ccs/bin/ld
 834      -amd64_LINT=             $(SPRO_ROOT)/sunstudio12.1/bin/lint
 835  831  
 836  832  NATIVECC=               $($(NATIVE_MACH)_CC)
 837  833  NATIVECCC=              $($(NATIVE_MACH)_CCC)
 838  834  NATIVECPP=              $($(NATIVE_MACH)_CPP)
 839  835  NATIVEAS=               $($(NATIVE_MACH)_AS)
 840  836  NATIVELD=               $($(NATIVE_MACH)_LD)
 841  837  NATIVELINT=             $($(NATIVE_MACH)_LINT)
 842  838  
 843  839  #
 844  840  # Makefile.master.64 overrides these settings
 845  841  #
 846  842  CC=                     $(NATIVECC)
 847  843  CCC=                    $(NATIVECCC)
 848  844  CPP=                    $(NATIVECPP)
 849  845  AS=                     $(NATIVEAS)
 850  846  LD=                     $(NATIVELD)
 851  847  LINT=                   $(NATIVELINT)
 852  848  
 853      -# The real compilers used for this build
 854      -CW_CC_CMD=              $(CC) -_compiler
 855      -CW_CCC_CMD=             $(CCC) -_compiler
 856      -REAL_CC=                $(CW_CC_CMD:sh)
 857      -REAL_CCC=               $(CW_CCC_CMD:sh)
 858      -
 859  849  # Pass -Y flag to cpp (method of which is release-dependent)
 860  850  CCYFLAG=                -Y I,
 861  851  
 862  852  BDIRECT=        -Bdirect
 863  853  BDYNAMIC=       -Bdynamic
 864  854  BLOCAL=         -Blocal
 865  855  BNODIRECT=      -Bnodirect
 866  856  BREDUCE=        -Breduce
 867  857  BSTATIC=        -Bstatic
 868  858  
↓ open down ↓ 35 lines elided ↑ open up ↑
 904  894  sparc_C_BIGPICFLAGS =   -K PIC
 905  895  sparcv9_C_BIGPICFLAGS = -K PIC
 906  896  i386_C_BIGPICFLAGS =    -K PIC
 907  897  amd64_C_BIGPICFLAGS =   -K PIC
 908  898  C_BIGPICFLAGS =         $($(MACH)_C_BIGPICFLAGS)
 909  899  C_BIGPICFLAGS64 =       $($(MACH64)_C_BIGPICFLAGS)
 910  900  
 911  901  # CC requires there to be no space between '-K' and 'pic' or 'PIC'.
 912  902  sparc_CC_PICFLAGS =     -Kpic
 913  903  sparcv9_CC_PICFLAGS =   -KPIC
 914      -i386_CC_PICFLAGS =      -Kpic
 915      -amd64_CC_PICFLAGS =     -Kpic
      904 +i386_CC_PICFLAGS =      -Kpic
      905 +amd64_CC_PICFLAGS =     -Kpic
 916  906  CC_PICFLAGS =           $($(MACH)_CC_PICFLAGS)
 917  907  CC_PICFLAGS64 =         $($(MACH64)_CC_PICFLAGS)
 918  908  
 919  909  AS_PICFLAGS=            $(C_PICFLAGS)
 920  910  AS_BIGPICFLAGS=         $(C_BIGPICFLAGS)
 921  911  
 922  912  #
 923  913  # Default label for CTF sections
 924  914  #
 925  915  CTFCVTFLAGS=            -i -L VERSION
↓ open down ↓ 31 lines elided ↑ open up ↑
 957  947  #               add the standard comment (mcs -a $(RELEASE_CM))
 958  948  #               add the development specific comment (mcs -a $(DEV_CM))
 959  949  #
 960  950  #       If this is an release build:
 961  951  #               delete the comment section (mcs -d)
 962  952  #               add the standard comment (mcs -a $(RELEASE_CM))
 963  953  #
 964  954  # The following list of macros are used in the definition of RELEASE_CM
 965  955  # which is used to label all binaries in the build:
 966  956  #
 967      -#       RELEASE         Specific release of the build, eg: 5.2
      957 +#       RELEASE         Specific release of the build, eg: 5.2
 968  958  #       RELEASE_MAJOR   Major version number part of $(RELEASE)
 969  959  #       RELEASE_MINOR   Minor version number part of $(RELEASE)
 970  960  #       VERSION         Version of the build (alpha, beta, Generic)
 971  961  #       PATCHID         If this is a patch this value should contain
 972  962  #                       the patchid value (eg: "Generic 100832-01"), otherwise
 973  963  #                       it will be set to $(VERSION)
 974  964  #       RELEASE_DATE    Date of the Release Build
 975  965  #       PATCH_DATE      Date the patch was created, if this is blank it
 976  966  #                       will default to the RELEASE_DATE
 977  967  #
↓ open down ↓ 6 lines elided ↑ open up ↑
 984  974  PATCH_DATE=     $(RELEASE_DATE)
 985  975  RELEASE_CM=     "@($(POUND_SIGN))SunOS $(RELEASE) $(PATCHID) $(PATCH_DATE)"
 986  976  DEV_CM=         "@($(POUND_SIGN))SunOS Internal Development: non-nightly build"
 987  977  
 988  978  PROCESS_COMMENT=  @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM)
 989  979  $(RELEASE_BUILD)PROCESS_COMMENT=   @?${MCS} -d -a $(RELEASE_CM)
 990  980  
 991  981  STRIP_STABS=                       $(STRIP) -x $@
 992  982  $(SRCDBGBLD)STRIP_STABS=           :
 993  983  
 994      -POST_PROCESS_O= 
      984 +POST_PROCESS_O=
 995  985  POST_PROCESS_A=
 996  986  POST_PROCESS_SO=        $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
 997  987                          $(ELFSIGN_OBJECT)
 998  988  POST_PROCESS=           $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \
 999  989                          $(ELFSIGN_OBJECT)
1000  990  
1001  991  #
1002  992  # chk4ubin is a tool that inspects a module for a symbol table
1003  993  # ELF section size which can trigger an OBP bug on older platforms.
1004  994  # This problem affects only specific sun4u bootable modules.
↓ open down ↓ 78 lines elided ↑ open up ↑
1083 1073  
1084 1074  .java.class:
1085 1075          $(COMPILE.java) $<
1086 1076  
1087 1077  # Bourne and Korn shell script message catalog build rules.
1088 1078  # We extract all gettext strings with sed(1) (being careful to permit
1089 1079  # multiple gettext strings on the same line), weed out the dups, and
1090 1080  # build the catalogue with awk(1).
1091 1081  
1092 1082  .sh.po .ksh.po:
1093      -        $(SED) -n -e ":a"                               \
1094      -                  -e "h"                                        \
     1083 +        $(SED) -n -e ":a"                                       \
     1084 +                  -e "h"                                        \
1095 1085                    -e "s/.*gettext *\(\"[^\"]*\"\).*/\1/p"       \
1096 1086                    -e "x"                                        \
1097 1087                    -e "s/\(.*\)gettext *\"[^\"]*\"\(.*\)/\1\2/"  \
1098 1088                    -e "t a"                                      \
1099 1089                 $< | sort -u | $(AWK) '{ print "msgid\t" $$0 "\nmsgstr" }' > $@
1100 1090  
1101 1091  #
1102 1092  # Python and Perl executable and message catalog build rules.
1103 1093  #
1104 1094  .SUFFIXES: .pl .pm .py .pyc
↓ open down ↓ 85 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX