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 # Compiler-specific flags for sparcworks. 26 27 # tell make which C and C++ compilers to use 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 REORDER_FLAG = -xF 39 40 # Check for the versions of C++ and C compilers ($CXX and $CC) used. 41 42 # Get the last thing on the line that looks like x.x+ (x is a digit). 43 COMPILER_REV := \ 44 $(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') 45 CC_COMPILER_REV := \ 46 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') 47 48 # Pick which compiler is validated 49 ifeq ($(JRE_RELEASE_VER),1.6.0) 50 # Validated compiler for JDK6 is SS11 (5.8) 51 VALIDATED_COMPILER_REVS := 5.8 52 VALIDATED_CC_COMPILER_REVS := 5.8 53 else 54 # Validated compiler for JDK7 is SS12 update 1 + patches (5.10) 55 VALIDATED_COMPILER_REVS := 5.10 56 VALIDATED_CC_COMPILER_REVS := 5.10 539 AOUT_FLAGS += $(ILDFLAG) 540 endif 541 542 # Where to put the *.o files (a.out, or shared library)? 543 LINK_INTO = $(LINK_INTO/$(VERSION)) 544 LINK_INTO/debug = LIBJVM 545 LINK_INTO/optimized = LIBJVM 546 547 # We link the debug version into the a.out because: 548 # 1. ild works on a.out but not shared libraries, and using ild 549 # can cut rebuild times by 25% for small changes. (ILD is gone in SS11) 550 # 2. dbx cannot gracefully set breakpoints in shared libraries 551 # 552 553 # apply this setting to link into the shared library even in the debug version: 554 ifdef LP64 555 LINK_INTO = LIBJVM 556 else 557 #LINK_INTO = LIBJVM 558 endif 559 560 MCS = /usr/ccs/bin/mcs 561 STRIP = /usr/ccs/bin/strip 562 563 # Solaris platforms collect lots of redundant file-ident lines, 564 # to the point of wasting a significant percentage of file space. 565 # (The text is stored in ELF .comment sections, contributed by 566 # all "#pragma ident" directives in header and source files.) 567 # This command "compresses" the .comment sections simply by 568 # removing repeated lines. The data can be extracted from 569 # binaries in the field by using "mcs -p libjvm.so" or the older 570 # command "what libjvm.so". 571 LINK_LIB.CXX/POST_HOOK += $(MCS) -c $@ || exit 1; 572 # (The exit 1 is necessary to cause a build failure if the command fails and 573 # multiple commands are strung together, and the final semicolon is necessary 574 # since the hook must terminate itself as a valid command.) 575 576 # Also, strip debug and line number information (worth about 1.7Mb). 577 # If we can create .debuginfo files, then the VM is stripped in vm.make 578 # and this macro is not used. 579 STRIP_LIB.CXX/POST_HOOK = $(STRIP) -x $@ || exit 1; 580 # STRIP_LIB.CXX/POST_HOOK is incorporated into LINK_LIB.CXX/POST_HOOK 581 # in certain configurations, such as product.make. Other configurations, | 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 REORDER_FLAG = -xF 43 44 # Check for the versions of C++ and C compilers ($CXX and $CC) used. 45 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') 51 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 543 AOUT_FLAGS += $(ILDFLAG) 544 endif 545 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 550 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 # 556 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 563 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.) 576 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, |