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