make-rules/shared-macros.mk
branchs11-update
changeset 2855 576d5a7857b7
parent 2818 ff3cbef81e88
child 2910 f8b8cbc43356
equal deleted inserted replaced
2854:78392507fd82 2855:576d5a7857b7
    30 # anywhere else.
    30 # anywhere else.
    31 INTERNAL_ARCHIVE_MIRROR =	http://userland.us.oracle.com/source-archives
    31 INTERNAL_ARCHIVE_MIRROR =	http://userland.us.oracle.com/source-archives
    32 
    32 
    33 # The location of an external mirror of community source archives that we build
    33 # The location of an external mirror of community source archives that we build
    34 # in this gate.  The external mirror is a replica of the internal mirror.
    34 # in this gate.  The external mirror is a replica of the internal mirror.
    35 EXTERNAL_ARCHIVE_MIRROR = \
    35 EXTERNAL_ARCHIVE_MIRROR = 
    36 	http://static.opensolaris.org/action/browse/userland/tarball/userland
       
    37 
    36 
    38 # Default to looking for source archives on the internal mirror and the external
    37 # Default to looking for source archives on the internal mirror and the external
    39 # mirror before we hammer on the community source archive repositories.
    38 # mirror before we hammer on the community source archive repositories.
    40 export DOWNLOAD_SEARCH_PATH +=	$(INTERNAL_ARCHIVE_MIRROR)
    39 export DOWNLOAD_SEARCH_PATH +=	$(INTERNAL_ARCHIVE_MIRROR)
       
    40 ifneq   ($(strip $(EXTERNAL_ARCHIVE_MIRROR)),)
    41 export DOWNLOAD_SEARCH_PATH +=	$(EXTERNAL_ARCHIVE_MIRROR)
    41 export DOWNLOAD_SEARCH_PATH +=	$(EXTERNAL_ARCHIVE_MIRROR)
       
    42 endif
    42 
    43 
    43 # The workspace starts at the mercurial root
    44 # The workspace starts at the mercurial root
    44 ifeq ($(origin WS_TOP), undefined)
    45 ifeq ($(origin WS_TOP), undefined)
    45 export WS_TOP :=		$(shell hg root)
    46 export WS_TOP :=		$(shell hg root)
    46 endif
    47 endif
    62 export SHELLOPTS
    63 export SHELLOPTS
    63 build:		SHELLOPTS=
    64 build:		SHELLOPTS=
    64 test:		SHELLOPTS=
    65 test:		SHELLOPTS=
    65 install:	SHELLOPTS=
    66 install:	SHELLOPTS=
    66 publish:	SHELLOPTS=pipefail
    67 publish:	SHELLOPTS=pipefail
       
    68 
       
    69 # some things don't build properly in non-C locales,
       
    70 # so lets stay there
       
    71 export LC_ALL=C
    67 
    72 
    68 SHELL=	/bin/bash
    73 SHELL=	/bin/bash
    69 
    74 
    70 CONSOLIDATION =	userland
    75 CONSOLIDATION =	userland
    71 PUBLISHER ?=	$(CONSOLIDATION)
    76 PUBLISHER ?=	$(CONSOLIDATION)
   220 BUILD_TOOLS ?=	/ws/on11update-tools
   225 BUILD_TOOLS ?=	/ws/on11update-tools
   221 
   226 
   222 SPRO_ROOT =	$(BUILD_TOOLS)/SUNWspro
   227 SPRO_ROOT =	$(BUILD_TOOLS)/SUNWspro
   223 SPRO_VROOT =	$(SPRO_ROOT)/sunstudio12.1
   228 SPRO_VROOT =	$(SPRO_ROOT)/sunstudio12.1
   224 
   229 
   225 PARFAIT_ROOT =	$(BUILD_TOOLS)/parfait/parfait-tools-0.5.0.1/
   230 PARFAIT_ROOT =	$(BUILD_TOOLS)/parfait/parfait-tools-1.2.0.2
       
   231 PARFAIT_TOOLS=  $(WS_TOOLS)/$(MACH)/parfait
       
   232 PARFAIT_TOOLS_GCC3=     $(PARFAIT_TOOLS)/gcc3
   226 PARFAIT= $(PARFAIT_ROOT)/bin/parfait
   233 PARFAIT= $(PARFAIT_ROOT)/bin/parfait
   227 export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc
   234 export PARFAIT_NATIVESUNCC=$(SPRO_VROOT)/bin/cc
   228 export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC
   235 export PARFAIT_NATIVESUNCXX=$(SPRO_VROOT)/bin/CC
   229 export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc
   236 export PARFAIT_NATIVEGCC=$(GCC_ROOT)/bin/gcc
   230 export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++
   237 export PARFAIT_NATIVEGXX=$(GCC_ROOT)/bin/g++
   231 # for now
   238 # for now
   232 export PARFAIT_CLANG=0
   239 export PARFAIT_CLANG=0
   233 
   240 
   234 GCC_ROOT =	/usr/sfw
   241 GCC_ROOT =      /usr/gcc/4.7
       
   242 GCC3_ROOT =	/usr/sfw
   235 
   243 
   236 CC.studio.32 =	$(SPRO_VROOT)/bin/cc
   244 CC.studio.32 =	$(SPRO_VROOT)/bin/cc
   237 CXX.studio.32 =	$(SPRO_VROOT)/bin/CC
   245 CXX.studio.32 =	$(SPRO_VROOT)/bin/CC
   238 
   246 
   239 
   247 
   243 CC.gcc.32 =	$(GCC_ROOT)/bin/gcc
   251 CC.gcc.32 =	$(GCC_ROOT)/bin/gcc
   244 CXX.gcc.32 =	$(GCC_ROOT)/bin/g++
   252 CXX.gcc.32 =	$(GCC_ROOT)/bin/g++
   245 
   253 
   246 CC.gcc.64 =	$(GCC_ROOT)/bin/gcc
   254 CC.gcc.64 =	$(GCC_ROOT)/bin/gcc
   247 CXX.gcc.64 =	$(GCC_ROOT)/bin/g++
   255 CXX.gcc.64 =	$(GCC_ROOT)/bin/g++
       
   256 
       
   257 CC.gcc3.32 =    $(GCC3_ROOT)/bin/gcc
       
   258 CXX.gcc3.32 =   $(GCC3_ROOT)/bin/g++
       
   259 
       
   260 CC.gcc3.64 =    $(GCC3_ROOT)/bin/gcc
       
   261 CXX.gcc3.64 =   $(GCC3_ROOT)/bin/g++
   248 
   262 
   249 
   263 
   250 lint.32 =	$(SPRO_VROOT)/bin/lint -m32
   264 lint.32 =	$(SPRO_VROOT)/bin/lint -m32
   251 lint.64 =	$(SPRO_VROOT)/bin/lint -m64
   265 lint.64 =	$(SPRO_VROOT)/bin/lint -m64
   252 
   266 
   261 PYTHON.2.7.VENDOR_PACKAGES.32 = /usr/lib/python2.7/vendor-packages
   275 PYTHON.2.7.VENDOR_PACKAGES.32 = /usr/lib/python2.7/vendor-packages
   262 PYTHON.2.7.VENDOR_PACKAGES.64 = /usr/lib/python2.7/vendor-packages/64
   276 PYTHON.2.7.VENDOR_PACKAGES.64 = /usr/lib/python2.7/vendor-packages/64
   263 PYTHON.2.7.VENDOR_PACKAGES = $(PYTHON.2.7.VENDOR_PACKAGES.$(BITS))
   277 PYTHON.2.7.VENDOR_PACKAGES = $(PYTHON.2.7.VENDOR_PACKAGES.$(BITS))
   264 
   278 
   265 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
   279 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
   266 CC.studio.32 =	$(WS_TOOLS)/parfait/cc
   280 CC.studio.32 =	$(PARFAIT_TOOLS)/cc
   267 CXX.studio.32 =	$(WS_TOOLS)/parfait/CC
   281 CXX.studio.32 =	$(PARFAIT_TOOLS)/CC
   268 CC.studio.64 =	$(WS_TOOLS)/parfait/cc
   282 CC.studio.64 =	$(PARFAIT_TOOLS)/cc
   269 CXX.studio.64 =	$(WS_TOOLS)/parfait/CC
   283 CXX.studio.64 =	$(PARFAIT_TOOLS)/CC
   270 CC.gcc.32 =	$(WS_TOOLS)/parfait/gcc
   284 CC.gcc.32 =	$(PARFAIT_TOOLS)/gcc
   271 CXX.gcc.32 =	$(WS_TOOLS)/parfait/g++
   285 CXX.gcc.32 =	$(PARFAIT_TOOLS)/g++
   272 CC.gcc.64 =	$(WS_TOOLS)/parfait/gcc
   286 CC.gcc.64 =	$(PARFAIT_TOOLS)/gcc
   273 CXX.gcc.64 =	$(WS_TOOLS)/parfait/g++
   287 CXX.gcc.64 =	$(PARFAIT_TOOLS)/g++
   274 LD =		$(WS_TOOLS)/parfait/ld
   288 CC.gcc3.32 =    $(PARFAIT_TOOLS_GCC3)/gcc
       
   289 CXX.gcc3.32 =   $(PARFAIT_TOOLS_GCC3)/g++
       
   290 CC.gcc3.64 =    $(PARFAIT_TOOLS_GCC3)/gcc
       
   291 CXX.gcc3.64 =   $(PARFAIT_TOOLS_GCC3)/g++
       
   292 LD =		$(PARFAIT_TOOLS)/ld
   275 endif
   293 endif
   276 
   294 
   277 CC =		$(CC.$(COMPILER).$(BITS))
   295 CC =		$(CC.$(COMPILER).$(BITS))
   278 CXX =		$(CXX.$(COMPILER).$(BITS))
   296 CXX =		$(CXX.$(COMPILER).$(BITS))
   279 
   297 
   355 GPATCH_FLAGS =	-p$(PATCH_LEVEL) $(GPATCH_BACKUP)
   373 GPATCH_FLAGS =	-p$(PATCH_LEVEL) $(GPATCH_BACKUP)
   356 GSED =		/usr/gnu/bin/sed
   374 GSED =		/usr/gnu/bin/sed
   357 
   375 
   358 PKGREPO =	/usr/bin/pkgrepo
   376 PKGREPO =	/usr/bin/pkgrepo
   359 PKGSEND =	/usr/bin/pkgsend
   377 PKGSEND =	/usr/bin/pkgsend
   360 PKGLINT =	/usr/bin/pkglint
   378 ifeq   ($(strip $(PKGLINT_COMPONENT)),)
       
   379 PKGLINT =       /usr/bin/pkglint
       
   380 else
       
   381 PKGLINT =       ${WS_TOOLS}/pkglint
       
   382 endif
   361 
   383 
   362 ACLOCAL =	/usr/bin/aclocal-1.10
   384 ACLOCAL =	/usr/bin/aclocal-1.10
   363 AUTOMAKE =	/usr/bin/automake-1.10
   385 AUTOMAKE =	/usr/bin/automake-1.10
   364 AUTORECONF = 	/usr/bin/autoreconf
   386 AUTORECONF = 	/usr/bin/autoreconf
   365 
   387 
   553 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.  In most cases, it
   575 # CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" or similiar.  In most cases, it
   554 # should not be necessary to add CFLAGS to any environment other than the
   576 # should not be necessary to add CFLAGS to any environment other than the
   555 # configure environment.
   577 # configure environment.
   556 CFLAGS.gcc +=	$(gcc_OPT)
   578 CFLAGS.gcc +=	$(gcc_OPT)
   557 CFLAGS.gcc +=	$(gcc_XREGS)
   579 CFLAGS.gcc +=	$(gcc_XREGS)
       
   580 CFLAGS.gcc3 +=  $(gcc_OPT)
       
   581 CFLAGS.gcc3 +=  $(gcc_XREGS)
   558 
   582 
   559 
   583 
   560 # Build 32 or 64 bit objects.
   584 # Build 32 or 64 bit objects.
   561 CFLAGS +=	$(CC_BITS)
   585 CFLAGS +=	$(CC_BITS)
   562 
   586 
   610 # symbols recursively until all symbols are resolved.  Components should be
   634 # symbols recursively until all symbols are resolved.  Components should be
   611 # linking in the libraries they need, in the required order.  This should
   635 # linking in the libraries they need, in the required order.  This should
   612 # only be required if the component's native build is horribly broken.
   636 # only be required if the component's native build is horribly broken.
   613 LD_Z_RESCAN_NOW =	-z rescan-now
   637 LD_Z_RESCAN_NOW =	-z rescan-now
   614 
   638 
   615 LD_Z_TEXT =		-z direct
   639 LD_Z_TEXT =		-z text
   616 
   640 
   617 # make sure that -lc is always present when building shared objects.
   641 # make sure that -lc is always present when building shared objects.
   618 LD_DEF_LIBS +=		-lc
   642 LD_DEF_LIBS +=		-lc
   619 
   643 
   620 # make sure all symbols are defined.
   644 # make sure all symbols are defined.
   621 LD_Z_DEFS =		-z defs
   645 LD_Z_DEFS =		-z defs
   622 
   646 
   623 # eliminate unreferenced dynamic dependencies
   647 # eliminate unreferenced dynamic dependencies
   624 LD_Z_IGNORE =		-z ignore
   648 LD_Z_IGNORE =		-z ignore
       
   649 
       
   650 # eliminate comments
       
   651 LD_Z_STRIP_CLASS =      -z strip-class=comment
   625 
   652 
   626 # use direct binding
   653 # use direct binding
   627 LD_B_DIRECT =		-Bdirect
   654 LD_B_DIRECT =		-Bdirect
   628 
   655 
   629 #
   656 #
   654 
   681 
   655 # Default linker options that everyone should get.  Do not add additional
   682 # Default linker options that everyone should get.  Do not add additional
   656 # libraries to this macro, as it will apply to everything linked during the
   683 # libraries to this macro, as it will apply to everything linked during the
   657 # component build.
   684 # component build.
   658 LD_OPTIONS +=	$(LD_MAP_NOEXSTK.$(MACH)) $(LD_MAP_NOEXDATA.$(MACH)) \
   685 LD_OPTIONS +=	$(LD_MAP_NOEXSTK.$(MACH)) $(LD_MAP_NOEXDATA.$(MACH)) \
   659 		$(LD_MAP_PAGEALIGN) $(LD_B_DIRECT) $(LD_Z_IGNORE)
   686 		$(LD_MAP_PAGEALIGN) $(LD_B_DIRECT) $(LD_Z_IGNORE) \
       
   687 		$(LD_Z_STRIP_CLASS)
   660 
   688 
   661 # Environment variables and arguments passed into the build and install
   689 # Environment variables and arguments passed into the build and install
   662 # environment(s).  These are the initial settings.
   690 # environment(s).  These are the initial settings.
   663 COMPONENT_BUILD_ENV= \
   691 COMPONENT_BUILD_ENV= \
   664     LD_OPTIONS="$(LD_OPTIONS)"
   692     LD_OPTIONS="$(LD_OPTIONS)"