# always breaking out a shell because the general case can cause a noticable
# While the majority of users are expected to override the setting below
# with an env file (via nightly or bldenv), if you aren't building that way
# (ie, you're using "ws" or some other bootstrapping method) then you need
# this definition in order to avoid the subshell invocation mentioned above.
POUND_SIGN= $(PRE_POUND:pre\%=%)
RELEASE_BUILD= $(POUND_SIGN)
$(RELEASE_BUILD)NOT_RELEASE_BUILD= $(POUND_SIGN)
PATCH_BUILD= $(POUND_SIGN)
# SPARC_BLD is '#' for an Intel build.
# INTEL_BLD is '#' for a Sparc build.
SPARC_BLD_1= $(MACH:i386=$(POUND_SIGN))
SPARC_BLD= $(SPARC_BLD_1:sparc=)
INTEL_BLD_1= $(MACH:sparc=$(POUND_SIGN))
INTEL_BLD= $(INTEL_BLD_1:i386=)
# The variables below control the compilers used during the build.
# There are a number of permutations.
# __GNUC and __SUNC control (and indicate) the primary compiler. Whichever
# one is not POUND_SIGN is the primary, with the other as the shadow. They
# may also be used to control entirely compiler-specific Makefile assignments.
# __GNUC and GCC are the default.
# __GNUC64 indicates that the 64bit build should use the GNU C compiler.
# There is no Sun C analogue.
# The following version-specific options are operative regardless of which
# compiler is primary, and control the versions of the given compilers to be
# used. They also allow compiler-version specific Makefile fragments.
$(__SUNC)__GNUC= $(POUND_SIGN)
# Allow build-time "configuration" to enable or disable some things.
# The default is POUND_SIGN, meaning "not enabled". If the environment
# passes in an override like ENABLE_SMB_PRINTING= (empty) that will
# uncomment things in the lower Makefiles to enable the feature.
ENABLE_IPP_PRINTING= $(POUND_SIGN)
ENABLE_SMB_PRINTING= $(POUND_SIGN)
# CLOSED is the root of the tree that contains source which isn't released
# BUILD_TOOLS is the root of all tools including compilers.
# ONBLD_TOOLS is the root of all the tools that are part of SUNWonbld.
ONBLD_TOOLS= $(BUILD_TOOLS)/onbld
# define buildtime JAVA_ROOT
GCCLIBDIR= $(GCC_ROOT)/lib
GCCLIBDIR64= $(GCC_ROOT)/lib/$(MACH64)
STABS= $(ONBLD_TOOLS)/bin/$(MACH)/stabs
ELFEXTRACT= $(ONBLD_TOOLS)/bin/$(MACH)/elfextract
MBH_PATCH= $(ONBLD_TOOLS)/bin/$(MACH)/mbh_patch
BTXLD= $(ONBLD_TOOLS)/bin/$(MACH)/btxld
CTFCONVERT= $(ONBLD_TOOLS)/bin/$(MACH)/ctfconvert
CTFMERGE= $(ONBLD_TOOLS)/bin/$(MACH)/ctfmerge
CTFSTABS= $(ONBLD_TOOLS)/bin/$(MACH)/ctfstabs
CTFSTRIP= $(ONBLD_TOOLS)/bin/$(MACH)/ctfstrip
NDRGEN= $(ONBLD_TOOLS)/bin/$(MACH)/ndrgen
PERL_ARCH = i86pc-solaris-64int
$(SPARC_BLD)PERL_ARCH = sun4-solaris-64int
MSGCC= $(ASTBINDIR)/msgcc
# Declare that nothing should be built in parallel.
# Individual Makefiles can use the .PARALLEL target to declare otherwise.
# Note that the X and C checks are not used at this time and may need
# modification when they are actually used.
@$(ECHO) "checking $<
"; $(CSTYLE) $< $(CSTYLE_TAIL); \ $(HDRCHK) $< $(HDRCHK_TAIL) @$(ECHO) "checking $<"; $(RPCGEN) -C -h $< | $(
CSTYLE) $(
CSTYLE_TAIL); \
$(
RPCGEN) -
C -
h $< | $(HDRCHK) $< $(
HDRCHK_TAIL)
@$(
ECHO)
"checking $<"; $(
CSTYLE) $< $(CSTYLE_TAIL)
@$(ECHO) "checking $<
"; \INS.file= $(RM) $@; $(INS) -s -m $(FILEMODE) -f $(@D) $< INS.dir= $(INS) -s -d -m $(DIRMODE) $@ # installs and renames at once INS.link= $(RM) $@; $(LN) $(INSLINKTARGET) $@ # Python bakes the mtime of the .py file into the compiled .pyc and # rebuilds if the baked-in mtime != the mtime of the source file # (rather than only if it's less than), thus when installing python # files we must make certain to not adjust the mtime of the source INS.pyfile= $(RM) $@; $(SED) -e "1s:^\#!@
PYTHON@:\#!$(
PYTHON):
" < $< > $@; $(CHMOD) $(FILEMODE) $@; $(TOUCH) -r $< $@ # MACH must be set in the shell environment per uname -p on the build host # More specific architecture variables should be set in lower makefiles. # MACH64 is derived from MACH, and BUILD64 is set to `#' for # architectures on which we do not build 64-bit versions. # (There are no such architectures at the moment.) # Set BUILD64=# in the environment to disable 64-bit amd64 # builds on i386 machines. MACH64_1= $(MACH:sparc=sparcv9) MACH64= $(MACH64_1:i386=amd64) MACH32_1= $(MACH:sparc=sparcv7) MACH32= $(MACH32_1:i386=i86) BUILD64= $($(MACH)_BUILD64) # C compiler mode. Future compilers may change the default on us, # so force extended ANSI mode globally. Lower level makefiles can # override this by setting CCMODE. # C compiler verbose mode. This is so we can enable it globally, # but turn it off in the lower level makefiles of things we cannot # (or aren't going to) fix. # set this to the secret flag "-
Wc,-
Qiselect-
v9abiwarn=1" to get warnings # from the compiler about places the -xarch=v9 may differ from -xarch=v9c. # set this to the secret flag "-
Wc,-
Qiselect-
regsym=0" to disable register # symbols (used to detect conflicts between objects that use global registers) # we disable this now for safety, and because genunix doesn't link with # this feature (the v9 default) enabled. # REGSYM is separate since the C++ driver syntax is different. CCREGSYM= -Wc,-Qiselect-regsym=0 CCCREGSYM= -Qoption cg -Qiselect-regsym=0 # Prevent the removal of static symbols by the SPARC code generator (cg). # The x86 code generator (ube) does not remove such symbols and as such # using this workaround is not applicable for x86. CCSTATICSYM= -Wc,-Qassembler-ounrefsym=0 # generate 32-bit addresses in the v9 kernel. Saves memory. CCABS32= -Wc,-xcode=abs32 # generate v9 code which tolerates callers using the v7 ABI, for the sake of CC32BITCALLERS= -_gcc=-massume-32bit-callers # GCC, especially, is increasingly beginning to auto-inline functions and # sadly does so separately not under the general -fno-inline-functions # Additionally, we wish to prevent optimisations which cause GCC to clone # functions -- in particular, these may cause unhelpful symbols to be # emitted instead of function names CCNOAUTOINLINE= -_gcc=-fno-inline-small-functions \ -_gcc=-fno-inline-functions-called-once \ # One optimization the compiler might perform is to turn this: # Since we do some of this (foo might be referenced in common kernel code # but provided only for some cpu modules or platforms), we disable this sparc_CCUNBOUND = -Wd,-xsafe=unboundsym CCUNBOUND = $($(MACH)_CCUNBOUND) # compiler '-xarch' flag. This is here to centralize it and make it # overridable for testing. amd64_XARCH= -m64 -Ui386 -U__i386 # assembler '-xarch' flag. Different from compiler '-xarch' flag. sparc_AS_XARCH= -xarch=v8plus sparcv9_AS_XARCH= -xarch=v9 amd64_AS_XARCH= -xarch=amd64 -P -Ui386 -U__i386 # These flags define what we need to be 'standalone' i.e. -not- part # of the rather more cosy userland environment. This basically means # XX64 future versions of gcc will make -mcmodel=kernel imply -mno-red-zone sparc_STAND_FLAGS= -_gcc=-ffreestanding sparcv9_STAND_FLAGS= -_gcc=-ffreestanding # Disabling MMX also disables 3DNow, disabling SSE also disables all later # additions to SSE (SSE2, AVX ,etc.) NO_SIMD= -_gcc=-mno-mmx -_gcc=-mno-sse i386_STAND_FLAGS= -_gcc=-ffreestanding $(NO_SIMD) amd64_STAND_FLAGS= -xmodel=kernel $(NO_SIMD) amd64_STAND_FLAGS += $(SAVEARGS) STAND_FLAGS_32 = $($(MACH)_STAND_FLAGS) STAND_FLAGS_64 = $($(MACH64)_STAND_FLAGS) # disable the incremental linker # turn warnings into errors (C) CERRWARN = -errtags=yes -errwarn=%all CERRWARN += -erroff=E_EMPTY_TRANSLATION_UNIT CERRWARN += -erroff=E_STATEMENT_NOT_REACHED CERRWARN += -_gcc=-Wno-missing-braces CERRWARN += -_gcc=-Wno-sign-compare CERRWARN += -_gcc=-Wno-unknown-pragmas CERRWARN += -_gcc=-Wno-unused-parameter CERRWARN += -_gcc=-Wno-missing-field-initializers # Unfortunately, this option can misfire very easily and unfixably. CERRWARN += -_gcc=-Wno-array-bounds # DEBUG v. -nd make for frequent unused variables, empty conditions, etc. in $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-unused $(RELEASE_BUILD)CERRWARN += -_gcc=-Wno-empty-body # turn warnings into errors (C++) C99LMODE= $(C99MODE:-xc99%=-Xc99%) # In most places, assignments to these macros should be appended with += sparc_CFLAGS= $(sparc_XARCH) $(CCSTATICSYM) sparcv9_CFLAGS= $(sparcv9_XARCH) -dalign $(CCVERBOSE) $(V9ABIWARN) $(CCREGSYM) \ i386_CFLAGS= $(i386_XARCH) amd64_CFLAGS= $(amd64_XARCH) sparc_ASFLAGS= $(sparc_AS_XARCH) sparcv9_ASFLAGS=$(sparcv9_AS_XARCH) i386_ASFLAGS= $(i386_AS_XARCH) amd64_ASFLAGS= $(amd64_AS_XARCH) COPTFLAG= $($(MACH)_COPTFLAG) COPTFLAG64= $($(MACH64)_COPTFLAG) # When -g is used, the compiler globalizes static objects # (gives them a unique prefix). Disable that. # Direct the Sun Studio compiler to use a static globalization prefix based on the # name of the module rather than something unique. Otherwise, objects # will not build deterministically, as subsequent compilations of identical # source will yeild objects that always look different. # In the same spirit, this will also remove the date from the N_OPT stab. CGLOBALSTATIC= -W0,-xglobalstatic # Sometimes we want all symbols and types in debugging information even CALLSYMS= -W0,-xdbggen=no%usedonly # Default debug format for Sun Studio 11 is dwarf, so force it to DEBUGFORMAT= -xdebugformat=stabs # Flags used to build in debug mode for ctf generation. Bugs in the Devpro # compilers currently prevent us from building with cc-emitted DWARF. CTF_FLAGS_sparc = -g -Wc,-Qiselect-T1 $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) CTF_FLAGS_i386 = -g $(C99MODE) $(CNOGLOBAL) $(CDWARFSTR) CTF_FLAGS_sparcv9 = $(CTF_FLAGS_sparc) CTF_FLAGS_amd64 = $(CTF_FLAGS_i386) # Sun Studio produces broken userland code when saving arguments. $(__GNUC)CTF_FLAGS_amd64 += $(SAVEARGS) CTF_FLAGS_32 = $(CTF_FLAGS_$(MACH)) $(DEBUGFORMAT) CTF_FLAGS_64 = $(CTF_FLAGS_$(MACH64)) $(DEBUGFORMAT) CTF_FLAGS = $(CTF_FLAGS_32) # Flags used with genoffsets OFFSETS_CREATE = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ $(CC) $(GOFLAGS) $(CFLAGS) $(CPPFLAGS) OFFSETS_CREATE64 = $(GENOFFSETS) -s $(CTFSTABS) -r $(CTFCONVERT) \ $(CC) $(GOFLAGS) $(CFLAGS64) $(CPPFLAGS) # tradeoff time for space (smaller is better) sparc_SPACEFLAG = -xspace -W0,-Lt sparcv9_SPACEFLAG = -xspace -W0,-Lt SPACEFLAG = $($(MACH)_SPACEFLAG) SPACEFLAG64 = $($(MACH64)_SPACEFLAG) # The Sun Studio 11 compiler has changed the behaviour of integer # wrap arounds and so a flag is needed to use the legacy behaviour # (without this flag panics/hangs could be exposed within the source). sparc_IROPTFLAG = -W2,-xwrap_int sparcv9_IROPTFLAG = -W2,-xwrap_int IROPTFLAG = $($(MACH)_IROPTFLAG) IROPTFLAG64 = $($(MACH64)_IROPTFLAG) sparc_XREGSFLAG = -xregs=no%appl sparcv9_XREGSFLAG = -xregs=no%appl XREGSFLAG = $($(MACH)_XREGSFLAG) XREGSFLAG64 = $($(MACH64)_XREGSFLAG) # dmake SOURCEDEBUG=yes ... enables source-level debugging information, and SOURCEDEBUG = $(POUND_SIGN) SRCDBGBLD = $(SOURCEDEBUG:yes=) # These variables are intended ONLY for use by developers to safely pass extra # flags to the compilers without unintentionally overriding Makefile-set # flags. They should NEVER be set to any value in a Makefile. # They come last in the associated FLAGS variable such that they can # explicitly override things if necessary, there are gaps in this, but it's # the best we can manage. CUSERFLAGS64 = $(CUSERFLAGS) CCUSERFLAGS64 = $(CCUSERFLAGS) $(SRCDBGBLD)CSOURCEDEBUGFLAGS = -g -xs $(SRCDBGBLD)CCSOURCEDEBUGFLAGS = -g -xs CFLAGS= $(COPTFLAG) $($(MACH)_CFLAGS) $(SPACEFLAG) $(CCMODE) \ $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG) \ $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CSOURCEDEBUGFLAGS) \ CFLAGS64= $(COPTFLAG64) $($(MACH64)_CFLAGS) $(SPACEFLAG64) $(CCMODE64) \ $(ILDOFF) $(CERRWARN) $(C99MODE) $(CCUNBOUND) $(IROPTFLAG64) \ $(CGLOBALSTATIC) $(CCNOAUTOINLINE) $(CSOURCEDEBUGFLAGS) \ # Flags that are used to build parts of the code that are subsequently # run on the build machine (also known as the NATIVE_BUILD). NATIVE_CFLAGS= $(COPTFLAG) $($(NATIVE_MACH)_CFLAGS) $(CCMODE) \ $(ILDOFF) $(CERRWARN) $(C99MODE) $($(NATIVE_MACH)_CCUNBOUND) \ $(IROPTFLAG) $(CGLOBALSTATIC) $(CCNOAUTOINLINE) \ $(CSOURCEDEBUGFLAGS) $(CUSERFLAGS) DTEXTDOM=-DTEXT_DOMAIN=\"$(
TEXT_DOMAIN)\
" # For messaging. CPPFLAGS.first= # Please keep empty. Only lower makefiles should set this. $(ENVCPPFLAGS1) $(ENVCPPFLAGS2) $(ENVCPPFLAGS3) $(ENVCPPFLAGS4) \ $(ENVCPPFLAGS4) -I$(NATIVE_ADJUNCT)/include JAVAFLAGS= -source 1.6 -target 1.6 -Xlint:deprecation,-options # For source message catalogue .SUFFIXES: $(SUFFIXES) .i .po MSGDOMAIN= $(MSGROOT)/$(TEXT_DOMAIN) MSGDOMAINPOFILE = $(MSGDOMAIN)/$(POFILE) DCMSGDOMAIN= $(MSGROOT)/LC_TIME/$(TEXT_DOMAIN) DCMSGDOMAINPOFILE = $(DCMSGDOMAIN)/$(DCFILE:.dc=.po) CLOBBERFILES += $(POFILE) $(POFILES) XGETFLAGS= -c TRANSLATION_NOTE GNUXGETFLAGS= --add-comments=TRANSLATION_NOTE --keyword=_ \ --strict --no-location --omit-header BUILD.po= $(XGETTEXT) $(XGETFLAGS) -d $(<F) $<.i ;\ $(SED) "/^
domain/
d" < $(<F).po > $@ ;\ # This is overwritten by local Makefile when PROG is a list. sparc_CCFLAGS= -cg92 -compat=4 \ -Qoption ccfe -messages=no%anachronism \ sparcv9_CCFLAGS= $(sparcv9_XARCH) -dalign -compat=5 \ -Qoption ccfe -messages=no%anachronism \ -Qoption ccfe -features=no%conststrings \ i386_CCFLAGS= -compat=4 \ -Qoption ccfe -messages=no%anachronism \ -Qoption ccfe -features=no%conststrings \ amd64_CCFLAGS= $(amd64_XARCH) -compat=5 \ -Qoption ccfe -messages=no%anachronism \ -Qoption ccfe -features=no%conststrings \ CCOPTFLAG= $($(MACH)_CCOPTFLAG) CCOPTFLAG64= $($(MACH64)_CCOPTFLAG) CCFLAGS= $(CCOPTFLAG) $($(MACH)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \ CCFLAGS64= $(CCOPTFLAG64) $($(MACH64)_CCFLAGS) $(CCSOURCEDEBUGFLAGS) \ # Various mapfiles that are used throughout the build, and delivered to # Generated mapfiles that are compiler specific, and used throughout the # build. These mapfiles are not delivered in /usr/lib/ld. # A generic interface mapfile name, used by various dynamic objects to define # the interfaces and interposers the object must export. # LDLIBS32 and LDLIBS64 can be set in the environment to override the following # These environment settings make sure that no libraries are searched outside # of the local workspace proto area: LDLIBS32 = $(ENVLDLIBS1) $(ENVLDLIBS2) $(ENVLDLIBS3) LDLIBS32 += $(ADJUNCT_PROTO:%=-L%/usr/lib -L%/lib) LDLIBS64 = $(ENVLDLIBS1:%=%/$(MACH64)) \ $(ENVLDLIBS2:%=%/$(MACH64)) \ $(ENVLDLIBS3:%=%/$(MACH64)) LDLIBS64 += $(ADJUNCT_PROTO:%=-L%/usr/lib/$(MACH64) -L%/lib/$(MACH64)) # Define compilation macros. COMPILE64.s= $(AS) $(ASFLAGS) $($(MACH64)_AS_XARCH) $(AS_CPPFLAGS) COMPILE.b= $(ELFWRAP) $(ELFWRAP_FLAGS$(CLASS)) CCEXTNEEDED = -lCrun -lCstd $(__GNUC)CCNEEDED = -L$(GCCLIBDIR) -lstdc++ -lgcc_s $(__GNUC)CCEXTNEEDED = $(CCNEEDED) LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) LINK64.c= $(CC) $(CFLAGS64) $(CPPFLAGS) $(LDFLAGS) NORUNPATH= -norunpath -nolib LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(NORUNPATH) \ LINK64.cc= $(CCC) $(CCFLAGS64) $(CPPFLAGS) $(NORUNPATH) \ # Note that the undefine of __PRAGMA_REDEFINE_EXTNAME can be removed once # ON is built with a version of lint that has the fix for 4484186. ALWAYS_LINT_DEFS = -errtags=yes -s ALWAYS_LINT_DEFS += -erroff=E_PTRDIFF_OVERFLOW ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_NARROW_CONV ALWAYS_LINT_DEFS += -U__PRAGMA_REDEFINE_EXTNAME ALWAYS_LINT_DEFS += $(C99LMODE) ALWAYS_LINT_DEFS += -errsecurity=$(SECLEVEL) ALWAYS_LINT_DEFS += -erroff=E_SEC_CREAT_WITHOUT_EXCL ALWAYS_LINT_DEFS += -erroff=E_SEC_FORBIDDEN_WARN_CREAT # XX64 -- really only needed for amd64 lint ALWAYS_LINT_DEFS += -erroff=E_ASSIGN_INT_TO_SMALL_INT ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_CONST_TO_SMALL_INT ALWAYS_LINT_DEFS += -erroff=E_CAST_INT_TO_SMALL_INT ALWAYS_LINT_DEFS += -erroff=E_CAST_TO_PTR_FROM_INT ALWAYS_LINT_DEFS += -erroff=E_COMP_INT_WITH_LARGE_INT ALWAYS_LINT_DEFS += -erroff=E_INTEGRAL_CONST_EXP_EXPECTED ALWAYS_LINT_DEFS += -erroff=E_PASS_INT_TO_SMALL_INT ALWAYS_LINT_DEFS += -erroff=E_PTR_CONV_LOSES_BITS # This forces lint to pick up note.h and sys/note.h from Devpro rather than # from the proto area. The note.h that ON delivers would disable NOTE(). LINT.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS) $(CPPFLAGS) \ LINT64.c= $(LINT) $(ONLY_LINT_DEFS) $(LINTFLAGS64) $(CPPFLAGS) \ # For some future builds, NATIVE_MACH and MACH might be different. # Therefore, NATIVE_MACH needs to be redefined in the # environment as `uname -p` to override this macro. # For now at least, we cross-compile amd64 on i386 machines. NATIVE_MACH= $(MACH:amd64=i386) # Define native compilation macros # Base directory where compilers are loaded. # Defined here so it can be overridden by developer. SPRO_ROOT= $(BUILD_TOOLS)/SUNWspro SPRO_VROOT= $(SPRO_ROOT)/SS12 # Till SS12u1 formally becomes the NV CBE, LINT is hard # location. Impacted variables are sparc_LINT, sparcv9_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++ 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++ 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++ $(__GNUC)i386_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw 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_AS= $(ONBLD_TOOLS)/bin/$(MACH)/aw NATIVECC= $($(NATIVE_MACH)_CC) NATIVECCC= $($(NATIVE_MACH)_CCC) NATIVECPP= $($(NATIVE_MACH)_CPP) NATIVEAS= $($(NATIVE_MACH)_AS) NATIVELD= $($(NATIVE_MACH)_LD) NATIVELINT= $($(NATIVE_MACH)_LINT) # The real compilers used for this build CW_CC_CMD= $(CC) -_compiler CW_CCC_CMD= $(CCC) -_compiler REAL_CCC= $(CW_CCC_CMD:sh) # Pass -Y flag to cpp (method of which is release-dependent) ZNODEFAULTLIB= -znodefaultlib ZNOLAZYLOAD= -znolazyload # Handle different PIC models on different ISAs # (May be overridden by lower-level Makefiles) sparc_C_PICFLAGS = -K pic sparcv9_C_PICFLAGS = -K pic amd64_C_PICFLAGS = -K pic C_PICFLAGS = $($(MACH)_C_PICFLAGS) C_PICFLAGS64 = $($(MACH64)_C_PICFLAGS) sparc_C_BIGPICFLAGS = -K PIC sparcv9_C_BIGPICFLAGS = -K PIC i386_C_BIGPICFLAGS = -K PIC amd64_C_BIGPICFLAGS = -K PIC C_BIGPICFLAGS = $($(MACH)_C_BIGPICFLAGS) C_BIGPICFLAGS64 = $($(MACH64)_C_BIGPICFLAGS) # CC requires there to be no space between '-K' and 'pic' or 'PIC'. sparc_CC_PICFLAGS = -Kpic sparcv9_CC_PICFLAGS = -KPIC amd64_CC_PICFLAGS = -Kpic CC_PICFLAGS = $($(MACH)_CC_PICFLAGS) CC_PICFLAGS64 = $($(MACH64)_CC_PICFLAGS) AS_PICFLAGS= $(C_PICFLAGS) AS_BIGPICFLAGS= $(C_BIGPICFLAGS) # Default label for CTF sections CTFCVTFLAGS= -i -L VERSION # Override to pass module-specific flags to ctfmerge. Currently used only by # krtld to turn on fuzzy matching, and source-level debugging to inhibit CTFCONVERT_O = $(CTFCONVERT) $(CTFCVTFLAGS) $@ ELFSIGN_CRYPTO= $(ELFSIGN_O) ELFSIGN_OBJECT= $(ELFSIGN_O) # Rules (normally from make.rules) and macros which are used for post # processing files. Normally, these do stripping of the comment section # RELEASE_CM: Should be editted to reflect the release. # POST_PROCESS_O: Post-processing for `.o' files. # POST_PROCESS_A: Post-processing for `.a' files (currently null). # POST_PROCESS_SO: Post-processing for `.so' files. # POST_PROCESS: Post-processing for executable files (no suffix). # Note that these macros are not completely generalized as they are to be # used with the file name to be processed following. # It is left as an exercise to Release Engineering to embellish the generation # of the release comment string. # If this is a standard development build: # compress the comment section (mcs -c) # add the standard comment (mcs -a $(RELEASE_CM)) # add the development specific comment (mcs -a $(DEV_CM)) # If this is an installation build: # delete the comment section (mcs -d) # add the standard comment (mcs -a $(RELEASE_CM)) # add the development specific comment (mcs -a $(DEV_CM)) # If this is an release build: # delete the comment section (mcs -d) # add the standard comment (mcs -a $(RELEASE_CM)) # The following list of macros are used in the definition of RELEASE_CM # which is used to label all binaries in the build: # RELEASE Specific release of the build, eg: 5.2 # RELEASE_MAJOR Major version number part of $(RELEASE) # RELEASE_MINOR Minor version number part of $(RELEASE) # VERSION Version of the build (alpha, beta, Generic) # PATCHID If this is a patch this value should contain # the patchid value (eg: "Generic 100832-
01"), otherwise # it will be set to $(VERSION) # RELEASE_DATE Date of the Release Build # PATCH_DATE Date the patch was created, if this is blank it # will default to the RELEASE_DATE RELEASE= $(RELEASE_MAJOR).$(RELEASE_MINOR) VERSION= SunOS Development RELEASE_DATE= release date not set PATCH_DATE= $(RELEASE_DATE) RELEASE_CM= "@($(
POUND_SIGN))
SunOS $(
RELEASE) $(
PATCHID) $(
PATCH_DATE)
" DEV_CM= "@($(
POUND_SIGN))
SunOS Internal Development:
non-
nightly build" PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) -a $(DEV_CM) $(RELEASE_BUILD)PROCESS_COMMENT= @?${MCS} -d -a $(RELEASE_CM) STRIP_STABS= $(STRIP) -x $@ $(SRCDBGBLD)STRIP_STABS= : POST_PROCESS_SO= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \ POST_PROCESS= $(PROCESS_COMMENT) $@ ; $(STRIP_STABS) ; \ # chk4ubin is a tool that inspects a module for a symbol table # ELF section size which can trigger an OBP bug on older platforms. # This problem affects only specific sun4u bootable modules. CHK4UBIN= $(ONBLD_TOOLS)/bin/$(MACH)/chk4ubin CHK4UBINARY= $(CHK4UBIN) $(CHK4UBINFLAGS) $@ # PKGARCHIVE specifies the default location where packages should be $(RELEASE_BUILD)PKGARCHIVESUFFIX= -nd PKGARCHIVE=$(SRC)/packages/$(MACH)/nightly$(PKGARCHIVESUFFIX) # The repositories will be created with these publisher settings. To # update an image to the resulting repositories, this must match the # publisher name provided to "pkg set-
publisher.
" PKGPUBLISHER_REDIST= on-nightly PKGPUBLISHER_NONREDIST= on-extra # Default build rules which perform comment section post-processing. $(COMPILE.c) $(OUTPUT_OPTION) $< $(CTFCONVERT_HOOK) $(LINK.c) -o $@ $*.c -ll $(LDLIBS) # Bourne and Korn shell script message catalog build rules. # We extract all gettext strings with sed(1) (being careful to permit # multiple gettext strings on the same line), weed out the dups, and # build the catalogue with awk(1). -e "s/.*
gettext *\(\
"[^\"]*\
"\).*/\1/p" \
-
e "s/\(.*\)gettext *\"[^\
"]*\"\(.*\)/\
1\
2/
" \ $< | sort -u | $(AWK) '{ print "msgid\
t" $$0 "\
nmsgstr" }' > $@ # Python and Perl executable and message catalog build rules. .SUFFIXES: .pl .pm .py .pyc $(SED) -e "s@
TEXT_DOMAIN@\
"$(TEXT_DOMAIN)\"@
" $< > $@; $(RM) $@; $(SED) -e "1s:^\#!@
PYTHON@:\#!$(
PYTHON):
" < $< > $@; $(CHMOD) +x $@ $(PYTHON) -mpy_compile $< @[ $(<)c = $@ ] || $(MV) $(<)c $@ $(GNUXGETTEXT) $(GNUXGETFLAGS) -d $(<F:%.py=%) $< ; $(XGETTEXT) $(XGETFLAGS) -d $(<F) $< ; $(SED) "/^
domain/
d" < $(<F).po > $@ ; # When using xgettext, we want messages to go to the default domain, # rather than the specified one. This special version of the # COMPILE.cpp macro effectively prevents expansion of TEXT_DOMAIN, # causing xgettext to put all messages into the default domain. # Rules to perform stylistic checks .SUFFIXES: .x .xml .check .xmlchk # Include rules to render automated sccs get rules "safe".