make/solaris/makefiles/sparcWorks.make

Wed, 22 Feb 2012 09:24:35 +0100

author
erikj
date
Wed, 22 Feb 2012 09:24:35 +0100
changeset 3600
7292cff45988
parent 3518
719f7007c8e8
child 3726
74c359c4a9e5
permissions
-rw-r--r--

7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
Reviewed-by: dholmes, ohrstrom, ohair, jcoomes

     1 #
     2 # Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.
     8 #
     9 # This code is distributed in the hope that it will be useful, but WITHOUT
    10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    11 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    12 # version 2 for more details (a copy is included in the LICENSE file that
    13 # accompanied this code).
    14 #
    15 # You should have received a copy of the GNU General Public License version
    16 # 2 along with this work; if not, write to the Free Software Foundation,
    17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    18 #
    19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    20 # or visit www.oracle.com if you need additional information or have any
    21 # questions.
    22 #  
    23 #
    25 # If a SPEC is not set already, then use these defaults.
    26 ifeq ($(SPEC),)
    27   # Compiler-specific flags for sparcworks.
    28   CC	= cc
    29   CXX	= CC
    31   # Note that this 'as' is an older version of the Sun Studio 'fbe', and will
    32   #   use the older style options. The 'fbe' options will match 'cc' and 'CC'.
    33   AS	= /usr/ccs/bin/as
    35   NM    = /usr/ccs/bin/nm
    36   NAWK  = /bin/nawk
    38   MCS	= /usr/ccs/bin/mcs
    39   STRIP	= /usr/ccs/bin/strip
    40 endif
    42 REORDER_FLAG = -xF
    44 # Check for the versions of C++ and C compilers ($CXX and $CC) used. 
    46 # Get the last thing on the line that looks like x.x+ (x is a digit).
    47 COMPILER_REV := \
    48 $(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
    49 CC_COMPILER_REV := \
    50 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p')
    52 # Pick which compiler is validated
    53 ifeq ($(JRE_RELEASE_VER),1.6.0)
    54   # Validated compiler for JDK6 is SS11 (5.8)
    55   VALIDATED_COMPILER_REVS   := 5.8
    56   VALIDATED_CC_COMPILER_REVS := 5.8
    57 else
    58   # Validated compiler for JDK7 is SS12 update 1 + patches (5.10)
    59   VALIDATED_COMPILER_REVS   := 5.10
    60   VALIDATED_CC_COMPILER_REVS := 5.10
    61 endif
    63 # Warning messages about not using the above validated versions
    64 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS})
    65 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),)
    66 PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV})
    67 dummy_var_to_enforce_compiler_rev := $(shell \
    68 	echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \
    69 	should be using version ${PRINTABLE_CC_REVS}.; \
    70 	echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \
    71 	warning.)
    72 endif
    74 ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS})
    75 ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),)
    76 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV})
    77 dummy_var_to_enforce_c_compiler_rev := $(shell \
    78 	echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \
    79 	should be using version ${PRINTABLE_C_REVS}.; \
    80 	echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \
    81 	warning.)
    82 endif
    84 COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }')
    86 # Fail the build if __fabsf is used.  __fabsf exists only in Solaris 8 2/04
    87 # and newer; objects with a dependency on this symbol will not run on older
    88 # Solaris 8.
    89 JVM_FAIL_IF_UNDEFINED = __fabsf
    91 JVM_CHECK_SYMBOLS = $(NM) -u -p $(LIBJVM.o) | \
    92 	$(NAWK) -v f="${JVM_FAIL_IF_UNDEFINED}" \
    93 	     'BEGIN    { c=split(f,s); rc=0; } \
    94 	      /:$$/     { file = $$1; } \
    95 	      /[^:]$$/  { for(n=1;n<=c;++n) { \
    96 			   if($$1==s[n]) { \
    97 			     printf("JVM_CHECK_SYMBOLS: %s contains illegal symbol %s\n", \
    98 				    file,$$1); \
    99 			     rc=1; \
   100 			   } \
   101 		         } \
   102                        } \
   103 	      END      { exit rc; }'
   105 LINK_LIB.CXX/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1;
   107 # New architecture options started in SS12 (5.9), we need both styles to build.
   108 #   The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as.
   109 #   Note: default for 32bit sparc is now the same as v8plus, so the
   110 #         settings below have changed all 32bit sparc builds to be v8plus.
   111 ARCHFLAG_OLD/sparc   = -xarch=v8plus
   112 ARCHFLAG_NEW/sparc   = -m32 -xarch=sparc
   113 ARCHFLAG_OLD/sparcv9 = -xarch=v9
   114 ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
   115 ARCHFLAG_OLD/i486    =
   116 ARCHFLAG_NEW/i486    = -m32
   117 ARCHFLAG_OLD/amd64   = -xarch=amd64
   118 ARCHFLAG_NEW/amd64   = -m64
   120 # Select the ARCHFLAGs and other SS12 (5.9) options
   121 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
   122   ARCHFLAG/sparc   = $(ARCHFLAG_NEW/sparc)
   123   ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9)
   124   ARCHFLAG/i486    = $(ARCHFLAG_NEW/i486)
   125   ARCHFLAG/amd64   = $(ARCHFLAG_NEW/amd64)
   126 else
   127   ARCHFLAG/sparc   = $(ARCHFLAG_OLD/sparc)
   128   ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9)
   129   ARCHFLAG/i486    = $(ARCHFLAG_OLD/i486)
   130   ARCHFLAG/amd64   = $(ARCHFLAG_OLD/amd64)
   131 endif
   133 # ARCHFLAGS for the current build arch
   134 ARCHFLAG    = $(ARCHFLAG/$(BUILDARCH))
   135 AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH))
   137 # Optional sub-directory in /usr/lib where BUILDARCH libraries are kept.
   138 ISA_DIR=$(ISA_DIR/$(BUILDARCH))
   139 ISA_DIR/sparcv9=/sparcv9
   140 ISA_DIR/amd64=/amd64
   142 # Use these to work around compiler bugs:
   143 OPT_CFLAGS/SLOWER=-xO3
   144 OPT_CFLAGS/O2=-xO2
   145 OPT_CFLAGS/NOOPT=-xO1
   147 # Flags for creating the dependency files.
   148 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
   149 DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d)
   150 endif
   152 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
   153 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
   155 # Compiler warnings are treated as errors
   156 CFLAGS_WARN = -xwe
   158 ################################################
   159 # Begin current (>=5.9) Forte compiler options #
   160 #################################################
   162 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
   163 ifeq ($(Platform_arch), x86)
   164 OPT_CFLAGS/NO_TAIL_CALL_OPT  = -Wu,-O~yz
   165 OPT_CCFLAGS/NO_TAIL_CALL_OPT = -Qoption ube -O~yz
   166 OPT_CFLAGS/stubGenerator_x86_32.o = $(OPT_CFLAGS) -xspace
   167 OPT_CFLAGS/stubGenerator_x86_64.o = $(OPT_CFLAGS) -xspace
   168 endif # Platform_arch == x86
   169 ifeq ("${Platform_arch}", "sparc")
   170 OPT_CFLAGS/stubGenerator_sparc.o = $(OPT_CFLAGS) -xspace
   171 endif
   172 endif # COMPILER_REV_NUMERIC >= 509
   174 #################################################
   175 # Begin current (>=5.6) Forte compiler options #
   176 #################################################
   178 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 506), 1)
   180 ifeq ("${Platform_arch}", "sparc")
   182 # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s)
   183 ifndef LP64
   184 CFLAGS += -xmemalign=4s
   185 endif
   187 endif
   189 endif
   191 #################################################
   192 # Begin current (>=5.5) Forte compiler options #
   193 #################################################
   195 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
   197 CFLAGS     += $(ARCHFLAG)
   198 AOUT_FLAGS += $(ARCHFLAG)
   199 LIB_FLAGS  += $(ARCHFLAG)
   200 LFLAGS     += $(ARCHFLAG)
   202 ifeq ("${Platform_arch}", "sparc")
   204 # Flags for Optimization
   206 # [phh] Commented out pending verification that we do indeed want
   207 #       to potentially bias against u1 and u3 targets.
   208 #CFLAGS += -xchip=ultra2
   210 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
   212 endif # sparc
   214 ifeq ("${Platform_arch_model}", "x86_32")
   216 OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS)
   218 endif # 32bit x86
   220 ifeq ("${Platform_arch_model}", "x86_64")
   222 ASFLAGS += $(AS_ARCHFLAG)
   223 CFLAGS  += $(ARCHFLAG/amd64)
   224 # this one seemed useless
   225 LFLAGS_VM  += $(ARCHFLAG/amd64)
   226 # this one worked
   227 LFLAGS  += $(ARCHFLAG/amd64)
   228 AOUT_FLAGS += $(ARCHFLAG/amd64)
   230 # -xO3 is faster than -xO4 on specjbb with SS10 compiler
   231 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
   233 endif # 64bit x86
   235 # Inline functions
   236 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il
   238 # no more exceptions
   239 CFLAGS/NOEX=-features=no%except
   242 # avoid compilation problems arising from fact that C++ compiler tries 
   243 # to search for external template definition by just compiling additional
   244 # source files in th same context
   245 CFLAGS +=  -template=no%extdef
   247 # Reduce code bloat by reverting back to 5.0 behavior for static initializers
   248 CFLAGS += -features=no%split_init
   250 # Use -D_Crun_inline_placement so we don't get references to 
   251 #    __1c2n6FIpv_0_ or   void*operator new(unsigned,void*)
   252 #  This avoids the hard requirement of the newer Solaris C++ runtime patches.
   253 #  NOTE: This is an undocumented feature of the SS10 compiler. See 6306698.
   254 CFLAGS += -D_Crun_inline_placement
   256 # PIC is safer for SPARC, and is considerably slower
   257 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
   258 PICFLAG         = -KPIC
   259 PICFLAG/DEFAULT = $(PICFLAG)
   260 # [RGV] Need to figure which files to remove to get link to work
   261 #PICFLAG/BETTER  = -pic
   262 PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
   263 PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
   265 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
   266 MAPFLAG = -M FILENAME
   268 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
   269 SONAMEFLAG = -h SONAME
   271 # Build shared library
   272 SHARED_FLAG = -G
   274 # We don't need libCstd.so and librwtools7.so, only libCrun.so
   275 CFLAGS += -library=%none
   276 LFLAGS += -library=%none
   278 LFLAGS += -mt
   280 endif	# COMPILER_REV_NUMERIC >= 505
   282 ######################################
   283 # End 5.5 Forte compiler options     #
   284 ######################################
   286 ######################################
   287 # Begin 5.2 Forte compiler options   #
   288 ######################################
   290 ifeq ($(COMPILER_REV_NUMERIC), 502)
   292 CFLAGS     += $(ARCHFLAG)
   293 AOUT_FLAGS += $(ARCHFLAG)
   294 LIB_FLAGS  += $(ARCHFLAG)
   295 LFLAGS     += $(ARCHFLAG)
   297 ifeq ("${Platform_arch}", "sparc")
   299 # Flags for Optimization
   301 # [phh] Commented out pending verification that we do indeed want
   302 #       to potentially bias against u1 and u3 targets.
   303 #CFLAGS += -xchip=ultra2
   305 ifdef LP64
   306 # SC5.0 tools on v9 are flakey at -xO4
   307 # [phh] Is this still true for 6.1?
   308 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS)
   309 else
   310 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
   311 endif
   313 endif # sparc
   315 ifeq ("${Platform_arch_model}", "x86_32")
   317 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS)
   319 # SC5.0 tools on x86 are flakey at -xO4
   320 # [phh] Is this still true for 6.1?
   321 OPT_CFLAGS+=-xO3
   323 endif # 32bit x86
   325 # no more exceptions
   326 CFLAGS/NOEX=-noex
   328 # Inline functions
   329 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il
   331 # Reduce code bloat by reverting back to 5.0 behavior for static initializers
   332 CFLAGS += -Qoption ccfe -one_static_init
   334 # PIC is safer for SPARC, and is considerably slower
   335 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
   336 PICFLAG         = -KPIC
   337 PICFLAG/DEFAULT = $(PICFLAG)
   338 # [RGV] Need to figure which files to remove to get link to work
   339 #PICFLAG/BETTER  = -pic
   340 PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
   341 PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
   343 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
   344 MAPFLAG = -M FILENAME
   346 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
   347 SONAMEFLAG = -h SONAME
   349 # Build shared library
   350 SHARED_FLAG = -G
   352 # Would be better if these weren't needed, since we link with CC, but
   353 # at present removing them causes run-time errors
   354 LFLAGS += -library=Crun
   355 LIBS   += -library=Crun -lCrun
   357 endif	# COMPILER_REV_NUMERIC == 502
   359 ##################################
   360 # End 5.2 Forte compiler options #
   361 ##################################
   363 ##################################
   364 # Begin old 5.1 compiler options #
   365 ##################################
   366 ifeq ($(COMPILER_REV_NUMERIC), 501)
   368 _JUNK_ := $(shell echo >&2 \
   369        "*** ERROR: sparkWorks.make incomplete for 5.1 compiler")
   370 	@exit 1
   371 endif
   372 ##################################
   373 # End old 5.1 compiler options   #
   374 ##################################
   376 ##################################
   377 # Begin old 5.0 compiler options #
   378 ##################################
   380 ifeq	(${COMPILER_REV_NUMERIC}, 500)
   382 # Had to hoist this higher apparently because of other changes. Must
   383 # come before -xarch specification.
   384 #  NOTE: native says optimize for the machine doing the compile, bad news.
   385 CFLAGS += -xtarget=native
   387 CFLAGS     += $(ARCHFLAG)
   388 AOUT_FLAGS += $(ARCHFLAG)
   389 LIB_FLAGS  += $(ARCHFLAG)
   390 LFLAGS     += $(ARCHFLAG)
   392 CFLAGS += -library=iostream
   393 LFLAGS += -library=iostream  -library=Crun
   394 LIBS += -library=iostream -library=Crun -lCrun
   396 # Flags for Optimization
   397 ifdef LP64
   398 # SC5.0 tools on v9 are flakey at -xO4
   399 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS)
   400 else
   401 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
   402 endif
   404 ifeq ("${Platform_arch}", "sparc")
   406 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.il
   408 endif # sparc
   410 ifeq ("${Platform_arch_model}", "x86_32")
   411 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS)
   412 ifeq ("${COMPILER_REV_NUMERIC}", "500")
   413 # SC5.0 tools on x86 are flakey at -xO4
   414 OPT_CFLAGS+=-xO3
   415 else
   416 OPT_CFLAGS+=-xO4
   417 endif
   419 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
   421 endif  # 32bit x86
   423 # The following options run into misaligned ldd problem (raj)
   424 #OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra
   426 # no more exceptions
   427 CFLAGS/NOEX=-noex
   429 # PIC is safer for SPARC, and is considerably slower
   430 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC"
   431 PICFLAG         = -PIC
   432 PICFLAG/DEFAULT = $(PICFLAG)
   433 # [RGV] Need to figure which files to remove to get link to work
   434 #PICFLAG/BETTER  = -pic
   435 PICFLAG/BETTER  = $(PICFLAG/DEFAULT)
   436 PICFLAG/BYFILE  = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
   438 endif	# COMPILER_REV_NUMERIC = 500
   440 ################################
   441 # End old 5.0 compiler options #
   442 ################################
   444 ifeq ("${COMPILER_REV_NUMERIC}", "402")
   445 # 4.2 COMPILERS SHOULD NO LONGER BE USED
   446 _JUNK_ := $(shell echo >&2 \
   447        "*** ERROR: SC4.2 compilers are not supported by this code base!")
   448 	@exit 1
   449 endif
   451 # do not include shared lib path in a.outs
   452 AOUT_FLAGS += -norunpath
   453 LFLAGS_VM = -norunpath -z noversion
   455 # need position-indep-code for shared libraries
   456 # (ild appears to get errors on PIC code, so we'll try non-PIC for debug)
   457 ifeq ($(PICFLAGS),DEFAULT)
   458 VM_PICFLAG/LIBJVM  = $(PICFLAG/DEFAULT)
   459 else
   460 VM_PICFLAG/LIBJVM  = $(PICFLAG/BYFILE)
   461 endif
   462 VM_PICFLAG/AOUT    =
   464 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
   465 CFLAGS += $(VM_PICFLAG)
   467 # less dynamic linking (no PLTs, please)
   468 #LIB_FLAGS += $(LINK_MODE)
   469 # %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose
   471 LINK_MODE = $(LINK_MODE/$(VERSION))
   472 LINK_MODE/debug     =
   473 LINK_MODE/optimized = -Bsymbolic -znodefs
   475 # Have thread local errnos
   476 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1)
   477 CFLAGS += -mt
   478 else
   479 CFLAGS += -D_REENTRANT
   480 endif
   482 ifdef CC_INTERP
   483 # C++ Interpreter
   484 CFLAGS += -DCC_INTERP
   485 endif
   487 # Flags for Debugging
   488 # The -g0 setting allows the C++ frontend to inline, which is a big win.
   489 # The -xs setting disables 'lazy debug info' which puts everything in
   490 # the .so instead of requiring the '.o' files.
   491 ifneq ($(OBJCOPY),)
   492   OPT_CFLAGS += -g0 -xs
   493 endif
   494 DEBUG_CFLAGS = -g
   495 FASTDEBUG_CFLAGS = -g0
   496 ifneq ($(OBJCOPY),)
   497   DEBUG_CFLAGS += -xs
   498   FASTDEBUG_CFLAGS += -xs
   499 endif
   501 # Special global options for SS12
   502 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
   503   # There appears to be multiple issues with the new Dwarf2 debug format, so
   504   #   we tell the compiler to use the older 'stabs' debug format all the time.
   505   #   Note that this needs to be used in optimized compiles too to be 100%.
   506   #   This is a workaround for SS12 (5.9) bug 6694600
   507   CFLAGS += -xdebugformat=stabs
   508 endif
   510 # Enable the following CFLAGS additions if you need to compare the
   511 # built ELF objects.
   512 #
   513 # The -g option makes static data global and the "-Qoption ccfe
   514 # -xglobalstatic" option tells the compiler to not globalize static
   515 # data using a unique globalization prefix. Instead force the use of
   516 # a static globalization prefix based on the source filepath so the
   517 # objects from two identical compilations are the same.
   518 # EXTRA_CFLAGS only covers vm_version.cpp for some reason
   519 #EXTRA_CFLAGS += -Qoption ccfe -xglobalstatic
   520 #OPT_CFLAGS += -Qoption ccfe -xglobalstatic
   521 #DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic
   522 #FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic
   524 ifeq	(${COMPILER_REV_NUMERIC}, 502)
   525 COMPILER_DATE := $(shell $(CXX) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }')
   526 ifeq	(${COMPILER_DATE}, 2001/01/31)
   527 # disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy
   528 # use an innocuous value because it will get -g if it's empty
   529 FASTDEBUG_CFLAGS = -c
   530 endif
   531 endif
   533 # Uncomment or 'gmake CFLAGS_BROWSE=-sbfast' to get source browser information.
   534 # CFLAGS_BROWSE	= -sbfast
   535 CFLAGS		+= $(CFLAGS_BROWSE)
   537 # ILD is gone as of SS11 (5.8), not supportted in SS10 (5.7)
   538 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1)
   539   # use ild when debugging (but when optimizing we want reproducible results)
   540   ILDFLAG = $(ILDFLAG/$(VERSION))
   541   ILDFLAG/debug     = -xildon
   542   ILDFLAG/optimized =
   543   AOUT_FLAGS += $(ILDFLAG)
   544 endif
   546 # Where to put the *.o files (a.out, or shared library)?
   547 LINK_INTO = $(LINK_INTO/$(VERSION))
   548 LINK_INTO/debug = LIBJVM
   549 LINK_INTO/optimized = LIBJVM
   551 # We link the debug version into the a.out because:
   552 #  1. ild works on a.out but not shared libraries, and using ild
   553 #     can cut rebuild times by 25% for small changes. (ILD is gone in SS11)
   554 #  2. dbx cannot gracefully set breakpoints in shared libraries
   555 #
   557 # apply this setting to link into the shared library even in the debug version:
   558 ifdef LP64
   559 LINK_INTO = LIBJVM
   560 else
   561 #LINK_INTO = LIBJVM
   562 endif
   564 # Solaris platforms collect lots of redundant file-ident lines,
   565 # to the point of wasting a significant percentage of file space.
   566 # (The text is stored in ELF .comment sections, contributed by
   567 # all "#pragma ident" directives in header and source files.)
   568 # This command "compresses" the .comment sections simply by
   569 # removing repeated lines.  The data can be extracted from
   570 # binaries in the field by using "mcs -p libjvm.so" or the older
   571 # command "what libjvm.so".
   572 LINK_LIB.CXX/POST_HOOK += $(MCS) -c $@ || exit 1;
   573 # (The exit 1 is necessary to cause a build failure if the command fails and
   574 # multiple commands are strung together, and the final semicolon is necessary
   575 # since the hook must terminate itself as a valid command.)
   577 # Also, strip debug and line number information (worth about 1.7Mb).
   578 # If we can create .debuginfo files, then the VM is stripped in vm.make
   579 # and this macro is not used.
   580 STRIP_LIB.CXX/POST_HOOK = $(STRIP) -x $@ || exit 1;
   581 # STRIP_LIB.CXX/POST_HOOK is incorporated into LINK_LIB.CXX/POST_HOOK
   582 # in certain configurations, such as product.make.  Other configurations,
   583 # such as debug.make, do not include the strip operation.

mercurial