annotate make/solaris/makefiles/sparcWorks.make @ 5897:7292cff45988

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