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