make/common/Defs-solaris.gmk

changeset 194
0f60cf26c5b5
parent 158
91006f157c46
child 240
f90b3e014e83
     1.1 --- a/make/common/Defs-solaris.gmk	Fri Aug 13 11:38:10 2010 -0700
     1.2 +++ b/make/common/Defs-solaris.gmk	Mon Aug 30 14:39:42 2010 -0700
     1.3 @@ -28,16 +28,6 @@
     1.4  # targeted to Solaris.  Should not contain any rules.
     1.5  #
     1.6  
     1.7 -# Warning: the following variables are overridden by Defs.gmk. Set
     1.8 -# values will be silently ignored:
     1.9 -#   CFLAGS        (set $(OTHER_CFLAGS) instead)
    1.10 -#   CPPFLAGS      (set $(OTHER_CPPFLAGS) instead)
    1.11 -#   CXXFLAGS      (set $(OTHER_CXXFLAGS) instead)
    1.12 -#   LDFLAGS       (set $(OTHER_LDFAGS) instead)
    1.13 -#   LDLIBS        (set $(EXTRA_LIBS) instead)
    1.14 -#   LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
    1.15 -#   LINTFLAGS     (set $(OTHER_LINTFLAGS) instead)
    1.16 -
    1.17  # Get shared JDK settings
    1.18  include $(BUILDDIR)/common/shared/Defs.gmk
    1.19  
    1.20 @@ -45,600 +35,3 @@
    1.21  PLATFORM_SRC = $(TOPDIR)/src/solaris
    1.22  endif # PLATFORM_SRC
    1.23  
    1.24 -# platform specific include files
    1.25 -PLATFORM_INCLUDE_NAME = $(PLATFORM)
    1.26 -PLATFORM_INCLUDE      = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
    1.27 -
    1.28 -# suffix used for make dependencies files
    1.29 -DEPEND_SUFFIX = d
    1.30 -# suffix used for lint files
    1.31 -LINT_SUFFIX = ln
    1.32 -# The suffix applied to the library name for FDLIBM
    1.33 -FDDLIBM_SUFFIX = a
    1.34 -# The suffix applied to scripts (.bat for windows, nothing for unix)
    1.35 -SCRIPT_SUFFIX =
    1.36 -# CC compiler object code output directive flag value
    1.37 -CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
    1.38 -CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
    1.39 -
    1.40 -#
    1.41 -# Default HPI libraries. Build will build only native unless
    1.42 -# overriden at the make command line. This makes it convenient for
    1.43 -# people doing, say, a pthreads port -- they can create a posix
    1.44 -# directory here, and say "gnumake HPIS=posix" at the top
    1.45 -# level.
    1.46 -#
    1.47 -HPIS = native
    1.48 -
    1.49 -#
    1.50 -# Java default optimization (-x04/-O2) etc.  Applies to the VM.
    1.51 -#
    1.52 -ifeq ($(PRODUCT), java)
    1.53 -    _OPT = $(CC_HIGHER_OPT)
    1.54 -else
    1.55 -    _OPT = $(CC_LOWER_OPT)
    1.56 -    CPPFLAGS_DBG    += -DLOGGING -DDBINFO
    1.57 -endif
    1.58 -
    1.59 -#
    1.60 -# If -Xa is in CFLAGS_COMMON it will end up ahead of $(POPT) for the
    1.61 -# optimized build, and that ordering of the flags completely freaks
    1.62 -# out cc.  Hence, -Xa is instead in each CFLAGS variant.
    1.63 -#
    1.64 -# The more unusual options to the Sun C compiler:
    1.65 -#	-v		Stricter type checking, more error checking
    1.66 -#			(To turn ALL warnings into fatals, use -errwarn=%all)
    1.67 -#	-xstrconst	Place string literals and constants in read-only area
    1.68 -#			(means you can't write on your string literals)
    1.69 -#	-xs		Force debug information (stabs) into the .so or a.out
    1.70 -#			(makes the library/executable debuggable without the
    1.71 -#			.o files needing to be around, but at a space cost)
    1.72 -#	-g & -O		If you add the -g option to the optimized compiles
    1.73 -#			you will get better stack retraces, the code is
    1.74 -#			still optimized. This includes a space cost too.
    1.75 -#       -xc99=%none     Do NOT allow for c99 extensions to be used.
    1.76 -#                       e.g. declarations must precede statements
    1.77 -#       -xCC            Allow the C++ style of comments in C: //
    1.78 -#                       Required with many of the source files.
    1.79 -#       -mt             Assume multi-threaded (important)
    1.80 -#
    1.81 -
    1.82 -#
    1.83 -# Debug flag for C and C++ compiler
    1.84 -#
    1.85 -CFLAGS_DEBUG_OPTION=-g
    1.86 -CXXFLAGS_DEBUG_OPTION=-g
    1.87 -
    1.88 -# Turn off -g if we are doing tcov build
    1.89 -ifdef TCOV_BUILD
    1.90 -  CFLAGS_DEBUG_OPTION=
    1.91 -  CXXFLAGS_DEBUG_OPTION=
    1.92 -endif
    1.93 -
    1.94 -# FASTDEBUG: Optimize the -g builds, gives us a faster debug java
    1.95 -#        If true adds -O to the debug compiles. This allows for any assert
    1.96 -#        tests to remain and debug checking. The resulting code is faster
    1.97 -#        but less debuggable.  Stack traces are still valid, although only
    1.98 -#        approximate line numbers are given. Printing of local variables
    1.99 -#        during a debugging session is not possible, but stepping and
   1.100 -#        printing of global or static variables should be possible.
   1.101 -#        Performance/size of files should be about the same, maybe smaller.
   1.102 -#
   1.103 -ifeq ($(FASTDEBUG), true)
   1.104 -  CC_FASTDEBUG_OPT       = $(CC_LOWER_OPT)
   1.105 -  CFLAGS_DEBUG_OPTION    = -g   $(CC_FASTDEBUG_OPT)
   1.106 -  CXXFLAGS_DEBUG_OPTION  = -g0  $(CC_FASTDEBUG_OPT)
   1.107 -endif
   1.108 -
   1.109 -CFLAGS_COMMON   = -v -mt -L$(OBJDIR) -xc99=%none
   1.110 -CFLAGS_COMMON  += -xCC
   1.111 -CFLAGS_COMMON  += -errshort=tags
   1.112 -CFLAGS_OPT      = $(POPT)
   1.113 -CFLAGS_DBG      = $(CFLAGS_DEBUG_OPTION)
   1.114 -CFLAGS_COMMON  +=  -Xa $(CFLAGS_REQUIRED)
   1.115 -
   1.116 -# Assume MT behavior all the time (important)
   1.117 -CXXFLAGS_COMMON  = -mt
   1.118 -
   1.119 -# Assume no C++ exceptions are used
   1.120 -CXXFLAGS_COMMON += -features=no%except -DCC_NOEX
   1.121 -
   1.122 -# For C++, these options tell it to assume nothing about locating libraries
   1.123 -#    either at compile time, or at runtime. Use of these options will likely
   1.124 -#    require the use of -L and -R options to indicate where libraries will
   1.125 -#    be found at compile time (-L) and at runtime (-R).
   1.126 -#    The /usr/lib location comes for free, so no need to specify that one.
   1.127 -#    Note: C is much simplier and there is no need for these options. This
   1.128 -#          is mostly needed to avoid dependencies on libraries in the
   1.129 -#          Compiler install area, also see LIBCXX and LIBM.
   1.130 -CXXFLAGS_COMMON += -norunpath -xnolib
   1.131 -
   1.132 -#
   1.133 -# Treat compiler warnings as errors, if requested
   1.134 -#
   1.135 -ifeq ($(COMPILER_WARNINGS_FATAL),true)
   1.136 -  CFLAGS_COMMON += -errwarn=%all
   1.137 -  CXXFLAGS_COMMON += -errwarn=%all
   1.138 -endif
   1.139 -
   1.140 -CXXFLAGS_OPT	= $(POPT)
   1.141 -CXXFLAGS_DBG	= $(CXXFLAGS_DEBUG_OPTION)
   1.142 -CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
   1.143 -
   1.144 -# Add -xstrconst to the library compiles. This forces all string
   1.145 -#  literals into the read-only data section, which prevents them from
   1.146 -#  being written to and increases the runtime pages shared on the system.
   1.147 -#
   1.148 -ifdef LIBRARY
   1.149 -  CFLAGS_COMMON +=-xstrconst
   1.150 -endif
   1.151 -
   1.152 -# Source browser database
   1.153 -#
   1.154 -# COMPILE_WITH_SB    
   1.155 -#        If defined adds -xsb to compiles and creates a
   1.156 -#        source browsing database during compilation.
   1.157 -#
   1.158 -ifdef COMPILE_WITH_SB
   1.159 -  ifeq ($(LIBRARY), java)
   1.160 -    CFLAGS_DBG +=   -xsb
   1.161 -  endif
   1.162 -endif
   1.163 -
   1.164 -# Lint Flags:
   1.165 -#	-Xa			ANSI C plus K&R, favor ANSI rules
   1.166 -#       -Xarch=XXX		Same as 'cc -xarch=XXX'
   1.167 -#	-fd			report on old style func defs
   1.168 -#	-errchk=structarg	report on 64bit struct args by value
   1.169 -#	-errchk=longptr64	report on 64bit to 32bit issues (ignores casts)
   1.170 -#	-errchk=parentheses	report on suggested use of extra parens
   1.171 -#	-v 			suppress unused args
   1.172 -#	-x			suppress unused externs
   1.173 -#	-u			suppress extern func/vars used/defined
   1.174 -#	-errfmt=simple		use one line errors with position info
   1.175 -
   1.176 -LINTFLAGS_COMMON  = -Xa
   1.177 -LINTFLAGS_COMMON += -fd 
   1.178 -LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses
   1.179 -LINTFLAGS_COMMON += -v
   1.180 -LINTFLAGS_COMMON += -x 
   1.181 -LINTFLAGS_COMMON += -u
   1.182 -LINTFLAGS_COMMON += -errfmt=simple 
   1.183 -LINTFLAGS_OPT   = 
   1.184 -LINTFLAGS_DBG   =
   1.185 -
   1.186 -# The -W0,-noglobal tells the compiler to NOT generate mangled global
   1.187 -#    ELF data symbols for file local static data.
   1.188 -#    This can break fix&continue, but we'd rather do the same compilations
   1.189 -#    for deliverable bits as we do for non-deliverable bits
   1.190 -#    Tell the compilers to never generate globalized names, all the time.
   1.191 -CFLAGS_COMMON += -W0,-noglobal
   1.192 -
   1.193 -# Arch specific settings (determines type of .o files and instruction set)
   1.194 -ifeq ($(ARCH_FAMILY), sparc)
   1.195 -  ifdef VIS_NEEDED
   1.196 -    XARCH_VALUE/32=v8plusa
   1.197 -    XARCH_VALUE/64=v9a
   1.198 -  else 
   1.199 -    # Someday this should change to improve optimization on UltraSPARC
   1.200 -    #    and abandon the old v8-only machines like the SPARCstation 10.
   1.201 -    #    Indications with Mustang is that alacrity runs do not show a
   1.202 -    #    big improvement using v8plus over v8, but other benchmarks might.
   1.203 -    XARCH_VALUE/32=v8
   1.204 -    XARCH_VALUE/64=v9
   1.205 -  endif
   1.206 -endif
   1.207 -ifeq ($(ARCH_FAMILY), i586)
   1.208 -  XARCH_VALUE/64=amd64
   1.209 -  XARCH_VALUE/32=
   1.210 -endif
   1.211 -
   1.212 -# Arch value based on current data model being built
   1.213 -XARCH_VALUE=$(XARCH_VALUE/$(ARCH_DATA_MODEL))
   1.214 -ifneq ($(XARCH_VALUE), )
   1.215 -  # The actual compiler -xarch options to use
   1.216 -  XARCH_OPTION/32 = -xarch=$(XARCH_VALUE/32)
   1.217 -  XARCH_OPTION/64 = -xarch=$(XARCH_VALUE/64)
   1.218 -  XARCH_OPTION    = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
   1.219 -endif
   1.220 -
   1.221 -# If we have a specific -xarch value to use, add it
   1.222 -ifdef XARCH_OPTION
   1.223 -  CFLAGS_COMMON    += $(XARCH_OPTION)
   1.224 -  CXXFLAGS_COMMON  += $(XARCH_OPTION)
   1.225 -  ASFLAGS_COMMON   += $(XARCH_OPTION)
   1.226 -  EXTRA_LIBS       += $(XARCH_OPTION)
   1.227 -  LINTFLAGS_COMMON += -Xarch=$(XARCH_VALUE)
   1.228 -endif
   1.229 -
   1.230 -#
   1.231 -# uncomment the following to build with PERTURBALOT set
   1.232 -#
   1.233 -# OTHER_CFLAGS += -DPERTURBALOT
   1.234 -#
   1.235 -
   1.236 -CPPFLAGS_COMMON = -D$(ARCH_FAMILY) -D__solaris__ -D_REENTRANT 
   1.237 -CPPFLAGS_OPT    = 
   1.238 -CPPFLAGS_DBG    = -DDEBUG
   1.239 -
   1.240 -ifeq ($(ARCH_FAMILY), i586)
   1.241 -  # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
   1.242 -  #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
   1.243 -  #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
   1.244 -  #   Note: -Dmacro         is the same as    #define macro 1
   1.245 -  #         -Dmacro=	    is the same as    #define macro
   1.246 -  #
   1.247 -  CPPFLAGS_COMMON +=  -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH)
   1.248 -  # Turn off a superfluous compiler error message on Intel
   1.249 -  CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE
   1.250 -endif
   1.251 -
   1.252 -# Java memory management is based on memory mapping by default, but a
   1.253 -# system only assuming malloc/free can be built by adding -DUSE_MALLOC 
   1.254 -
   1.255 -CPPFLAGS_COMMON	+= -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS
   1.256 -CPPFLAGS_OPT	+= -DTRIMMED
   1.257 -
   1.258 -LDFLAGS_DEFS_OPTION  = -z defs
   1.259 -LDFLAGS_COMMON  += $(LDFLAGS_DEFS_OPTION)
   1.260 -
   1.261 -#
   1.262 -# -L paths for finding and -ljava
   1.263 -#
   1.264 -LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
   1.265 -LDFLAGS_OPT     =
   1.266 -LDFLAGS_DBG     =
   1.267 -
   1.268 -#
   1.269 -# We never really want the incremental linker, ever
   1.270 -#    The -xildoff option tells Sun's compilers to NOT use incremental linker
   1.271 -#
   1.272 -LDFLAGS_COMMON  += -xildoff
   1.273 -
   1.274 -ifdef LIBRARY
   1.275 -  # Libraries need to locate other libraries at runtime, and you can tell
   1.276 -  #   a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
   1.277 -  #   buried inside the .so. The $ORIGIN says to look relative to where
   1.278 -  #   the library itself is and it can be followed with relative paths from
   1.279 -  #   that. By default we always look in $ORIGIN, optionally we add relative
   1.280 -  #   paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
   1.281 -  #   The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
   1.282 -  #   Try: 'dump -Lv lib*.so' to see these settings in a library.
   1.283 -  #
   1.284 -  LDFLAGS_COMMON += -R\$$ORIGIN
   1.285 -  LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%)
   1.286 -endif
   1.287 -
   1.288 -EXTRA_LIBS += -lc
   1.289 -
   1.290 -# Postprocessing is done on the images directories only
   1.291 -#
   1.292 -ifeq ($(VARIANT), OPT)
   1.293 -  ifeq ($(PARTIAL_GPROF), true)
   1.294 -    NO_STRIP = true
   1.295 -  endif
   1.296 -  ifeq ($(GPROF), true)
   1.297 -    NO_STRIP = true
   1.298 -  endif
   1.299 -  ifneq ($(NO_STRIP), true)
   1.300 -    # Debug 'strip -x' leaves local function Elf symbols (better stack traces)
   1.301 -    POST_STRIP_PROCESS = $(STRIP) -x
   1.302 -  endif
   1.303 -endif
   1.304 -POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)"
   1.305 -
   1.306 -#
   1.307 -# Sun C compiler will take -M and pass it on to ld.
   1.308 -# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o
   1.309 -#
   1.310 -ifeq ($(CC_VERSION),gcc)
   1.311 -LD_MAPFILE_FLAG = -Xlinker -M -Xlinker
   1.312 -else
   1.313 -LD_MAPFILE_FLAG = -M
   1.314 -endif
   1.315 -
   1.316 -#
   1.317 -# Variables globally settable from the make command line (default
   1.318 -# values in brackets):
   1.319 -#	GPROF (false)
   1.320 -# Eg: 	% gnumake GPROF=true
   1.321 -GPROF = false
   1.322 -ifeq ($(GPROF), true)
   1.323 -    CFLAGS_COMMON += -DGPROF -xpg
   1.324 -    EXTRA_LIBS += -xpg
   1.325 -endif
   1.326 -
   1.327 -# PARTIAL_GPROF is to be used ONLY during compilation - it should not
   1.328 -# appear during linking of libraries or programs.  It also should
   1.329 -# prevent linking with -z defs to allow a symbol to remain undefined.
   1.330 -#
   1.331 -PARTIAL_GPROF = false
   1.332 -ifeq ($(PARTIAL_GPROF), true)
   1.333 -  CFLAGS_GPROF += -xpg
   1.334 -  LDFLAGS_DEFS_OPTION  = -z nodefs
   1.335 -endif
   1.336 -
   1.337 -#
   1.338 -# For a TCOV build we add in the TCOV_OPTION
   1.339 -#
   1.340 -ifdef TCOV_BUILD
   1.341 -  TCOV_OPTION		= -xprofile=tcov
   1.342 -  LDFLAGS_COMMON 	+= $(TCOV_OPTION) -Kpic
   1.343 -  CFLAGS_COMMON  	+= $(TCOV_OPTION)
   1.344 -  CXXFLAGS_COMMON 	+= $(TCOV_OPTION)
   1.345 -  EXTRA_LIBS 	+= $(TCOV_OPTION)
   1.346 -  LDNOMAP=true
   1.347 -endif
   1.348 -
   1.349 -#
   1.350 -# Solaris only uses native threads. 
   1.351 -#
   1.352 -THREADS_FLAG=	native
   1.353 -THREADS_DIR=	threads
   1.354 -
   1.355 -#
   1.356 -# Support for Quantify.
   1.357 -#
   1.358 -ifdef QUANTIFY
   1.359 -  QUANTIFY_CMD = quantify
   1.360 -  QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
   1.361 -  LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
   1.362 -  ifdef LIBRARY
   1.363 -    CFLAGS_COMMON += -K PIC
   1.364 -  endif
   1.365 -endif
   1.366 -
   1.367 -#
   1.368 -# Support for Purify.
   1.369 -#
   1.370 -ifdef PURIFY
   1.371 -  PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify
   1.372 -  PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
   1.373 -  LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS)
   1.374 -  ifdef LIBRARY
   1.375 -    CFLAGS_COMMON += -K PIC
   1.376 -  endif
   1.377 -endif
   1.378 -
   1.379 -#
   1.380 -# Different "levels" of optimization.
   1.381 -#
   1.382 -ifeq ($(CC_VERSION),gcc)
   1.383 -  CC_HIGHEST_OPT = -O3
   1.384 -  CC_HIGHER_OPT  = -O3
   1.385 -  CC_LOWER_OPT   = -O2
   1.386 -  CFLAGS_REQUIRED_i586  += -fno-omit-frame-pointer
   1.387 -  CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer
   1.388 -  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
   1.389 -  #   (See Rules.gmk) May need to wait for gcc 5?
   1.390 -  AUTOMATIC_PCH_OPTION = 
   1.391 -else
   1.392 -  # Highest could be -xO5, but indications are that -xO5 should be reserved
   1.393 -  #    for a per-file use, on sources with known performance impacts.
   1.394 -  CC_HIGHEST_OPT = -xO4
   1.395 -  CC_HIGHER_OPT  = -xO4
   1.396 -  CC_LOWER_OPT   = -xO2
   1.397 -  #
   1.398 -  # WARNING: Use of _OPT=$(CC_HIGHEST_OPT) in your Makefile needs to be
   1.399 -  #          done with care, there are some assumptions below that need to
   1.400 -  #          be understood about the use of pointers, and IEEE behavior.
   1.401 -  #
   1.402 -  # Use non-standard floating point mode (not IEEE 754)
   1.403 -  CC_HIGHEST_OPT += -fns
   1.404 -  # Do some simplification of floating point arithmetic (not IEEE 754)
   1.405 -  CC_HIGHEST_OPT += -fsimple
   1.406 -  # Use single precision floating point with 'float'
   1.407 -  CC_HIGHEST_OPT += -fsingle
   1.408 -  # Assume memory references via basic pointer types do not alias
   1.409 -  #   (Source with excessing pointer casting and data access with mixed 
   1.410 -  #    pointer types are not recommended)
   1.411 -  CC_HIGHEST_OPT += -xalias_level=basic
   1.412 -  # Use intrinsic or inline versions for math/std functions
   1.413 -  #   (If you expect perfect errno behavior, do not use this)
   1.414 -  CC_HIGHEST_OPT += -xbuiltin=%all
   1.415 -  # Loop data dependency optimizations (need -xO3 or higher)
   1.416 -  CC_HIGHEST_OPT += -xdepend
   1.417 -  # Pointer parameters to functions do not overlap
   1.418 -  #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
   1.419 -  #    If you pass in multiple pointers to the same data, do not use this)
   1.420 -  CC_HIGHEST_OPT += -xrestrict
   1.421 -  # Inline some library routines
   1.422 -  #   (If you expect perfect errno behavior, do not use this)
   1.423 -  CC_HIGHEST_OPT += -xlibmil
   1.424 -  # Use optimized math routines
   1.425 -  #   (If you expect perfect errno behavior, do not use this)
   1.426 -  #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
   1.427 -  #  CC_HIGHEST_OPT += -xlibmopt
   1.428 -  ifeq ($(ARCH_FAMILY), sparc)
   1.429 -    # Assume at most 8byte alignment, raise SIGBUS on error
   1.430 -    ### Presents an ABI issue with customer JNI libs?
   1.431 -    ####CC_HIGHEST_OPT  += -xmemalign=8s
   1.432 -    # Automatic prefetch instructions, explicit prefetch macros
   1.433 -    CC_HIGHEST_OPT  += -xprefetch=auto,explicit
   1.434 -    # Pick ultra as the chip to optimize to
   1.435 -    CC_HIGHEST_OPT  += -xchip=ultra
   1.436 -  endif
   1.437 -  ifeq ($(ARCH), i586)
   1.438 -    # Pick pentium as the chip to optimize to
   1.439 -    CC_HIGHEST_OPT  += -xchip=pentium
   1.440 -  endif
   1.441 -  ifdef LIBRARY
   1.442 -    # The Solaris CBE (Common Build Environment) requires that the use
   1.443 -    # of appl registers be disabled when compiling a public library (or
   1.444 -    # a library that's loaded by a public library) on sparc.
   1.445 -    CFLAGS_REQUIRED_sparc    += -xregs=no%appl
   1.446 -    CFLAGS_REQUIRED_sparcv9  += -xregs=no%appl
   1.447 -  endif
   1.448 -  ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1)
   1.449 -    # Do NOT use the frame pointer register as a general purpose opt register
   1.450 -    CFLAGS_REQUIRED_i586  += -xregs=no%frameptr
   1.451 -    CFLAGS_REQUIRED_amd64 += -xregs=no%frameptr
   1.452 -    # We MUST allow data alignment of 4 for sparc V8 (32bit)
   1.453 -    #     Presents an ABI issue with customer JNI libs? We must be able to
   1.454 -    #     to handle 4byte aligned objects? (rare occurance, but possible?)
   1.455 -    CFLAGS_REQUIRED_sparc += -xmemalign=4s
   1.456 -  endif
   1.457 -  # Just incase someone trys to use the SOS9 compilers
   1.458 -  ifeq ($(CC_VER), 5.6)
   1.459 -    # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
   1.460 -    CFLAGS_REQUIRED_sparc += -xmemalign=4s
   1.461 -  endif
   1.462 -  # Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
   1.463 -  #   (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken.
   1.464 -  AUTOMATIC_PCH_OPTION =
   1.465 -endif
   1.466 -CC_NO_OPT      = 
   1.467 -
   1.468 -# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off
   1.469 -ifdef NO_OPTIMIZATIONS
   1.470 -  CC_HIGHEST_OPT = $(CC_NO_OPT)
   1.471 -  CC_HIGHER_OPT  = $(CC_NO_OPT)
   1.472 -  CC_LOWER_OPT   = $(CC_NO_OPT)
   1.473 -endif
   1.474 -
   1.475 -# Flags required all the time
   1.476 -CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
   1.477 -
   1.478 -# Add processor specific options for optimizations
   1.479 -CC_HIGHEST_OPT += $(_OPT_$(ARCH))
   1.480 -CC_HIGHER_OPT  += $(_OPT_$(ARCH))
   1.481 -CC_LOWER_OPT   += $(_OPT_$(ARCH))
   1.482 -
   1.483 -# Secret compiler optimization options that should be in the above macros
   1.484 -#    but since they differ in format from C to C++, are added into the C or
   1.485 -#    C++ specific macros for compiler flags.
   1.486 -#
   1.487 -#  On i586 we need to tell the code generator to ALWAYS use a
   1.488 -#   frame pointer.
   1.489 -ifeq ($(ARCH_FAMILY), i586)
   1.490 -  # Note that in 5.7, this is done with -xregs=no%frameptr
   1.491 -  ifeq ($(CC_VER), 5.5)
   1.492 -    #       It's not exactly clear when this optimization kicks in, the
   1.493 -    #       current assumption is -xO4 or greater and for C++ with
   1.494 -    #       the -features=no%except option and -xO4 and greater.
   1.495 -    #       Bottom line is, we ALWAYS want a frame pointer!
   1.496 -    CXXFLAGS_OPT += -Qoption ube -Z~B
   1.497 -    CFLAGS_OPT   +=          -Wu,-Z~B
   1.498 -    ifeq ($(FASTDEBUG), true)
   1.499 -        CXXFLAGS_DBG += -Qoption ube -Z~B
   1.500 -        CFLAGS_DBG   +=          -Wu,-Z~B
   1.501 -    endif
   1.502 -  endif
   1.503 -endif
   1.504 -#
   1.505 -#  Optimizer for sparc needs to be told not to do certain things
   1.506 -#   related to frames or save instructions.
   1.507 -ifeq ($(ARCH_FAMILY), sparc)
   1.508 -  # NOTE: Someday the compilers will provide a high-level option for this.
   1.509 -  #   Use save instructions instead of add instructions
   1.510 -  #    This was an optimization starting in SC5.0 that made it hard for us to
   1.511 -  #    find the "save" instruction (which got turned into an "add")
   1.512 -  CXXFLAGS_OPT += -Qoption cg -Qrm-s
   1.513 -  CFLAGS_OPT   +=         -Wc,-Qrm-s
   1.514 -  ifeq ($(FASTDEBUG), true)
   1.515 -    CXXFLAGS_DBG += -Qoption cg -Qrm-s
   1.516 -    CFLAGS_DBG   +=         -Wc,-Qrm-s
   1.517 -  endif
   1.518 -  #
   1.519 -  # NOTE: Someday the compilers will provide a high-level option for this.
   1.520 -  #   Don't allow tail call code optimization. Started in SC5.0.
   1.521 -  #    We don't like code of this form:
   1.522 -  #	save
   1.523 -  #	<code>
   1.524 -  #	call foo
   1.525 -  #	   restore
   1.526 -  #   because we can't tell if the method will have a stack frame
   1.527 -  #   and register windows or not.
   1.528 -  CXXFLAGS_OPT += -Qoption cg -Qiselect-T0
   1.529 -  CFLAGS_OPT   +=         -Wc,-Qiselect-T0
   1.530 -  ifeq ($(FASTDEBUG), true)
   1.531 -    CXXFLAGS_DBG += -Qoption cg -Qiselect-T0
   1.532 -    CFLAGS_DBG   +=         -Wc,-Qiselect-T0
   1.533 -  endif
   1.534 -endif
   1.535 -
   1.536 -#
   1.537 -# Path and option to link against the VM, if you have to.  Note that
   1.538 -# there are libraries that link against only -ljava, but they do get
   1.539 -# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
   1.540 -# the library itself should not.
   1.541 -#
   1.542 -VM_NAME         = server
   1.543 -JVMLIB		= -L$(BOOTDIR)/jre/lib/$(LIBARCH)/server -ljvm
   1.544 -JAVALIB		=
   1.545 -
   1.546 -# Part of INCREMENTAL_BUILD mechanism.
   1.547 -#   Compiler emits things like:  path/file.o: file.h
   1.548 -#   We want something like: relative_path/file.o relative_path/file.d: file.h
   1.549 -#   In addition on Solaris, any include file starting with / is deleted,
   1.550 -#   this gets rid of things like /usr/include files, which never change.
   1.551 -CC_DEPEND	 = -xM1
   1.552 -CC_DEPEND_FILTER = $(SED) -e '/:[ 	]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u
   1.553 -
   1.554 -# Location of openwin libraries (do we really need this anymore?)
   1.555 -OPENWIN_HOME    = /usr/openwin
   1.556 -OPENWIN_LIB     = $(OPENWIN_HOME)/lib$(ISA_DIR)
   1.557 -
   1.558 -# Runtime graphics library search paths...
   1.559 -OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR)
   1.560 -AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB)
   1.561 -
   1.562 -# C++ Runtime library (libCrun.so), use instead of -lCrun.
   1.563 -#    Originally used instead of -lCrun to guarantee use of the system
   1.564 -#    .so version and not the .a or .so that came with the compilers.
   1.565 -#    With the newer compilers this could probably change back to -lCrun but
   1.566 -#    in general this is ok to continue to do.
   1.567 -LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1
   1.568 -
   1.569 -# Math Library (libm.so), do not use -lm.
   1.570 -#    There might be two versions of libm.so on the build system:
   1.571 -#    libm.so.1 and libm.so.2, and we want libm.so.1.
   1.572 -#    Depending on the Solaris release being used to build with,
   1.573 -#    /usr/lib/libm.so could point at a libm.so.2, so we are
   1.574 -#    explicit here so that the libjvm.so you have built will work on an
   1.575 -#    older Solaris release that might not have libm.so.2.
   1.576 -#    This is a critical factor in allowing builds on Solaris 10 or newer
   1.577 -#    to run on Solaris 8 or 9.
   1.578 -#
   1.579 -#    Note: Historically there was also a problem picking up a static version
   1.580 -#          of libm.a from the compiler area, but that problem has gone away
   1.581 -#          with the newer compilers. Use of libm.a would cause .so bloat.
   1.582 -#
   1.583 -LIBM = /usr/lib$(ISA_DIR)/libm.so.1
   1.584 -
   1.585 -# Socket library
   1.586 -LIBSOCKET = -lsocket
   1.587 -
   1.588 -# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
   1.589 -#    EXCEPT for select compiles
   1.590 -#    If a .o file is compiled non-PIC then it should be forced
   1.591 -#	   into the RW data segment with a mapfile option. This is done
   1.592 -#    with object files which generated from .s files.
   1.593 -#    The -ztext enforces that no relocations remain in the text segment
   1.594 -#    so that it remains purely read-only for optimum system performance.
   1.595 -#    Some libraries may use a smaller size (13bit -Kpic) on sparc instead of 
   1.596 -#    (32 bit -KPIC) and will override GLOBAL_KPIC appropriately.
   1.597 -#
   1.598 -PIC_CODE_LARGE   = -KPIC
   1.599 -PIC_CODE_SMALL   = -Kpic
   1.600 -ifndef TCOV_BUILD
   1.601 -    GLOBAL_KPIC      = $(PIC_CODE_LARGE)
   1.602 -    CXXFLAGS_COMMON += $(GLOBAL_KPIC)
   1.603 -    CFLAGS_COMMON   += $(GLOBAL_KPIC)
   1.604 -    LDFLAGS_COMMON  += -ztext
   1.605 -endif # TCOV_BUILD
   1.606 -
   1.607 -# If your platform has DPS, it will have Type1 fonts too, in which case
   1.608 -# it is best to enable DPS support until such time as 2D's rasteriser
   1.609 -# can fully handle Type1 fonts in all cases. Default is "yes".
   1.610 -# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
   1.611 -# DPS (Displayable PostScript) is available on Solaris machines
   1.612 -
   1.613 -HAVE_DPS = yes
   1.614 -
   1.615 -#
   1.616 -# Japanese manpages
   1.617 -#
   1.618 -JA_SOURCE_ENCODING = eucJP
   1.619 -JA_TARGET_ENCODINGS = eucJP UTF-8 PCK
   1.620 -

mercurial