annotate make/solaris/makefiles/rules.make @ 113:ba764ed4b6f2

6420645: Create a vm that uses compressed oops for up to 32gb heapsizes Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author coleenp
date Sun, 13 Apr 2008 17:43:42 -0400
parents a294fd0c4b38
children d1605aabd0a1 6470a2a42f92
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #
a61af66fc99e Initial load
duke
parents:
diff changeset
2 # Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved.
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 #
a61af66fc99e Initial load
duke
parents:
diff changeset
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 # CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 # have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 #
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # Common rules/macros for the vm, adlc.
a61af66fc99e Initial load
duke
parents:
diff changeset
26
a61af66fc99e Initial load
duke
parents:
diff changeset
27 # Tell make that .cpp is important
a61af66fc99e Initial load
duke
parents:
diff changeset
28 .SUFFIXES: .cpp $(SUFFIXES)
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30 # For now. Other makefiles use CPP as the c++ compiler, but that should really
a61af66fc99e Initial load
duke
parents:
diff changeset
31 # name the preprocessor.
a61af66fc99e Initial load
duke
parents:
diff changeset
32 ifeq ($(CCC),)
a61af66fc99e Initial load
duke
parents:
diff changeset
33 CCC = $(CPP)
a61af66fc99e Initial load
duke
parents:
diff changeset
34 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
35
a61af66fc99e Initial load
duke
parents:
diff changeset
36 DEMANGLER = c++filt
a61af66fc99e Initial load
duke
parents:
diff changeset
37 DEMANGLE = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
a61af66fc99e Initial load
duke
parents:
diff changeset
38
a61af66fc99e Initial load
duke
parents:
diff changeset
39 # $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++).
a61af66fc99e Initial load
duke
parents:
diff changeset
40 C_COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
41 CC_COMPILE = $(CCC) $(CPPFLAGS) $(CFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
42
a61af66fc99e Initial load
duke
parents:
diff changeset
43 AS.S = $(AS) $(ASFLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
44
a61af66fc99e Initial load
duke
parents:
diff changeset
45 COMPILE.c = $(C_COMPILE) -c
a61af66fc99e Initial load
duke
parents:
diff changeset
46 GENASM.c = $(C_COMPILE) -S
a61af66fc99e Initial load
duke
parents:
diff changeset
47 LINK.c = $(CC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
48 LINK_LIB.c = $(CC) $(LFLAGS) $(SHARED_FLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
49 PREPROCESS.c = $(C_COMPILE) -E
a61af66fc99e Initial load
duke
parents:
diff changeset
50
a61af66fc99e Initial load
duke
parents:
diff changeset
51 COMPILE.CC = $(CC_COMPILE) -c
a61af66fc99e Initial load
duke
parents:
diff changeset
52 GENASM.CC = $(CC_COMPILE) -S
a61af66fc99e Initial load
duke
parents:
diff changeset
53 LINK.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS) $(PROF_AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
54 LINK_NOPROF.CC = $(CCC) $(LFLAGS) $(AOUT_FLAGS)
a61af66fc99e Initial load
duke
parents:
diff changeset
55 LINK_LIB.CC = $(CCC) $(LFLAGS) $(SHARED_FLAG)
a61af66fc99e Initial load
duke
parents:
diff changeset
56 PREPROCESS.CC = $(CC_COMPILE) -E
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58 # Effect of REMOVE_TARGET is to delete out-of-date files during "gnumake -k".
a61af66fc99e Initial load
duke
parents:
diff changeset
59 REMOVE_TARGET = rm -f $@
a61af66fc99e Initial load
duke
parents:
diff changeset
60
a61af66fc99e Initial load
duke
parents:
diff changeset
61 # Synonyms.
a61af66fc99e Initial load
duke
parents:
diff changeset
62 COMPILE.cpp = $(COMPILE.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
63 GENASM.cpp = $(GENASM.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
64 LINK.cpp = $(LINK.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
65 LINK_LIB.cpp = $(LINK_LIB.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
66 PREPROCESS.cpp = $(PREPROCESS.CC)
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 # Note use of ALT_BOOTDIR to explicitly specify location of java and
a61af66fc99e Initial load
duke
parents:
diff changeset
69 # javac; this is the same environment variable used in the J2SE build
a61af66fc99e Initial load
duke
parents:
diff changeset
70 # process for overriding the default spec, which is BOOTDIR.
a61af66fc99e Initial load
duke
parents:
diff changeset
71 # Note also that we fall back to using JAVA_HOME if neither of these is
a61af66fc99e Initial load
duke
parents:
diff changeset
72 # specified.
a61af66fc99e Initial load
duke
parents:
diff changeset
73
a61af66fc99e Initial load
duke
parents:
diff changeset
74 ifdef ALT_BOOTDIR
a61af66fc99e Initial load
duke
parents:
diff changeset
75
a61af66fc99e Initial load
duke
parents:
diff changeset
76 RUN.JAVA = $(ALT_BOOTDIR)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
77 RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
78 RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
79 RUN.JAR = $(ALT_BOOTDIR)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
80 COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
81 COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
82 BOOT_JAVA_HOME = $(ALT_BOOTDIR)
a61af66fc99e Initial load
duke
parents:
diff changeset
83
a61af66fc99e Initial load
duke
parents:
diff changeset
84 else
a61af66fc99e Initial load
duke
parents:
diff changeset
85
a61af66fc99e Initial load
duke
parents:
diff changeset
86 ifdef BOOTDIR
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 RUN.JAVA = $(BOOTDIR)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
89 RUN.JAVAP = $(BOOTDIR)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
90 RUN.JAVAH = $(BOOTDIR)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
91 RUN.JAR = $(BOOTDIR)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
92 COMPILE.JAVAC = $(BOOTDIR)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
93 COMPILE.RMIC = $(BOOTDIR)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
94 BOOT_JAVA_HOME = $(BOOTDIR)
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 else
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98 ifdef JAVA_HOME
a61af66fc99e Initial load
duke
parents:
diff changeset
99
a61af66fc99e Initial load
duke
parents:
diff changeset
100 RUN.JAVA = $(JAVA_HOME)/bin/java
a61af66fc99e Initial load
duke
parents:
diff changeset
101 RUN.JAVAP = $(JAVA_HOME)/bin/javap
a61af66fc99e Initial load
duke
parents:
diff changeset
102 RUN.JAVAH = $(JAVA_HOME)/bin/javah
a61af66fc99e Initial load
duke
parents:
diff changeset
103 RUN.JAR = $(JAVA_HOME)/bin/jar
a61af66fc99e Initial load
duke
parents:
diff changeset
104 COMPILE.JAVAC = $(JAVA_HOME)/bin/javac
a61af66fc99e Initial load
duke
parents:
diff changeset
105 COMPILE.RMIC = $(JAVA_HOME)/bin/rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
106 BOOT_JAVA_HOME = $(JAVA_HOME)
a61af66fc99e Initial load
duke
parents:
diff changeset
107
a61af66fc99e Initial load
duke
parents:
diff changeset
108 else
a61af66fc99e Initial load
duke
parents:
diff changeset
109
a61af66fc99e Initial load
duke
parents:
diff changeset
110 # take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined
a61af66fc99e Initial load
duke
parents:
diff changeset
111 # note that this is to support hotspot build without SA. To build
a61af66fc99e Initial load
duke
parents:
diff changeset
112 # SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME
a61af66fc99e Initial load
duke
parents:
diff changeset
113
a61af66fc99e Initial load
duke
parents:
diff changeset
114 RUN.JAVA = java
a61af66fc99e Initial load
duke
parents:
diff changeset
115 RUN.JAVAP = javap
a61af66fc99e Initial load
duke
parents:
diff changeset
116 RUN.JAVAH = javah
a61af66fc99e Initial load
duke
parents:
diff changeset
117 RUN.JAR = jar
a61af66fc99e Initial load
duke
parents:
diff changeset
118 COMPILE.JAVAC = javac
a61af66fc99e Initial load
duke
parents:
diff changeset
119 COMPILE.RMIC = rmic
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
122 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
123 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
124
a61af66fc99e Initial load
duke
parents:
diff changeset
125 SUM = /usr/bin/sum
a61af66fc99e Initial load
duke
parents:
diff changeset
126
a61af66fc99e Initial load
duke
parents:
diff changeset
127 # 'gmake MAKE_VERBOSE=y' gives all the gory details.
a61af66fc99e Initial load
duke
parents:
diff changeset
128 QUIETLY$(MAKE_VERBOSE) = @
a61af66fc99e Initial load
duke
parents:
diff changeset
129 RUN.JAR$(MAKE_VERBOSE) += >/dev/null
a61af66fc99e Initial load
duke
parents:
diff changeset
130
a61af66fc99e Initial load
duke
parents:
diff changeset
131 # With parallel makes, print a message at the end of compilation.
a61af66fc99e Initial load
duke
parents:
diff changeset
132 ifeq ($(findstring j,$(MFLAGS)),j)
a61af66fc99e Initial load
duke
parents:
diff changeset
133 COMPILE_DONE = && { echo Done with $<; }
a61af66fc99e Initial load
duke
parents:
diff changeset
134 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
135
a61af66fc99e Initial load
duke
parents:
diff changeset
136 # A list of directories under which all source code are built without -KPIC/-Kpic
a61af66fc99e Initial load
duke
parents:
diff changeset
137 # flag. Performance measurements show that compiling GC related code will
a61af66fc99e Initial load
duke
parents:
diff changeset
138 # dramatically reduce the gc pause time. See bug 6454213 for more details.
a61af66fc99e Initial load
duke
parents:
diff changeset
139
a61af66fc99e Initial load
duke
parents:
diff changeset
140 include $(GAMMADIR)/make/scm.make
a61af66fc99e Initial load
duke
parents:
diff changeset
141
a61af66fc99e Initial load
duke
parents:
diff changeset
142 NONPIC_DIRS = memory oops gc_implementation gc_interface
a61af66fc99e Initial load
duke
parents:
diff changeset
143 NONPIC_DIRS := $(foreach dir,$(NONPIC_DIRS), $(GAMMADIR)/src/share/vm/$(dir))
a61af66fc99e Initial load
duke
parents:
diff changeset
144 # Look for source code under NONPIC_DIRS
a61af66fc99e Initial load
duke
parents:
diff changeset
145 NONPIC_FILES := $(foreach dir,$(NONPIC_DIRS),\
a61af66fc99e Initial load
duke
parents:
diff changeset
146 $(shell find $(dir) \( $(SCM_DIRS) \) -prune -o \
a61af66fc99e Initial load
duke
parents:
diff changeset
147 -name '*.cpp' -print))
a61af66fc99e Initial load
duke
parents:
diff changeset
148 NONPIC_OBJ_FILES := $(notdir $(subst .cpp,.o,$(NONPIC_FILES)))
a61af66fc99e Initial load
duke
parents:
diff changeset
149
a61af66fc99e Initial load
duke
parents:
diff changeset
150 # Sun compiler for 64 bit Solaris does not support building non-PIC object files.
a61af66fc99e Initial load
duke
parents:
diff changeset
151 ifdef LP64
a61af66fc99e Initial load
duke
parents:
diff changeset
152 %.o: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
153 @echo Compiling $<
a61af66fc99e Initial load
duke
parents:
diff changeset
154 $(QUIETLY) $(REMOVE_TARGET)
a61af66fc99e Initial load
duke
parents:
diff changeset
155 $(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
156 else
a61af66fc99e Initial load
duke
parents:
diff changeset
157 %.o: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
158 @echo Compiling $<
a61af66fc99e Initial load
duke
parents:
diff changeset
159 $(QUIETLY) $(REMOVE_TARGET)
a61af66fc99e Initial load
duke
parents:
diff changeset
160 $(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
a61af66fc99e Initial load
duke
parents:
diff changeset
161 $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
a61af66fc99e Initial load
duke
parents:
diff changeset
162 $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
a61af66fc99e Initial load
duke
parents:
diff changeset
163 endif
a61af66fc99e Initial load
duke
parents:
diff changeset
164
a61af66fc99e Initial load
duke
parents:
diff changeset
165 %.o: %.s
a61af66fc99e Initial load
duke
parents:
diff changeset
166 @echo Assembling $<
a61af66fc99e Initial load
duke
parents:
diff changeset
167 $(QUIETLY) $(REMOVE_TARGET)
a61af66fc99e Initial load
duke
parents:
diff changeset
168 $(QUIETLY) $(AS.S) -o $@ $< $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
169
a61af66fc99e Initial load
duke
parents:
diff changeset
170 %.s: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
171 @echo Generating assembly for $<
a61af66fc99e Initial load
duke
parents:
diff changeset
172 $(QUIETLY) $(GENASM.CC) -o $@ $<
a61af66fc99e Initial load
duke
parents:
diff changeset
173 $(QUIETLY) $(DEMANGLE) $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
174
a61af66fc99e Initial load
duke
parents:
diff changeset
175 # Intermediate files (for debugging macros)
a61af66fc99e Initial load
duke
parents:
diff changeset
176 %.i: %.cpp
a61af66fc99e Initial load
duke
parents:
diff changeset
177 @echo Preprocessing $< to $@
a61af66fc99e Initial load
duke
parents:
diff changeset
178 $(QUIETLY) $(PREPROCESS.CC) $< > $@ $(COMPILE_DONE)
a61af66fc99e Initial load
duke
parents:
diff changeset
179
a61af66fc99e Initial load
duke
parents:
diff changeset
180 # Override gnumake built-in rules which do sccs get operations badly.
a61af66fc99e Initial load
duke
parents:
diff changeset
181 # (They put the checked out code in the current directory, not in the
a61af66fc99e Initial load
duke
parents:
diff changeset
182 # directory of the original file.) Since this is a symptom of a teamware
a61af66fc99e Initial load
duke
parents:
diff changeset
183 # failure, and since not all problems can be detected by gnumake due
a61af66fc99e Initial load
duke
parents:
diff changeset
184 # to incomplete dependency checking... just complain and stop.
a61af66fc99e Initial load
duke
parents:
diff changeset
185 %:: s.%
a61af66fc99e Initial load
duke
parents:
diff changeset
186 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
187 @echo File $@
a61af66fc99e Initial load
duke
parents:
diff changeset
188 @echo is out of date with respect to its SCCS file.
a61af66fc99e Initial load
duke
parents:
diff changeset
189 @echo This file may be from an unresolved Teamware conflict.
a61af66fc99e Initial load
duke
parents:
diff changeset
190 @echo This is also a symptom of a Teamware bringover/putback failure
a61af66fc99e Initial load
duke
parents:
diff changeset
191 @echo in which SCCS files are updated but not checked out.
a61af66fc99e Initial load
duke
parents:
diff changeset
192 @echo Check for other out of date files in your workspace.
a61af66fc99e Initial load
duke
parents:
diff changeset
193 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
194 @exit 666
a61af66fc99e Initial load
duke
parents:
diff changeset
195
a61af66fc99e Initial load
duke
parents:
diff changeset
196 %:: SCCS/s.%
a61af66fc99e Initial load
duke
parents:
diff changeset
197 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
198 @echo File $@
a61af66fc99e Initial load
duke
parents:
diff changeset
199 @echo is out of date with respect to its SCCS file.
a61af66fc99e Initial load
duke
parents:
diff changeset
200 @echo This file may be from an unresolved Teamware conflict.
a61af66fc99e Initial load
duke
parents:
diff changeset
201 @echo This is also a symptom of a Teamware bringover/putback failure
a61af66fc99e Initial load
duke
parents:
diff changeset
202 @echo in which SCCS files are updated but not checked out.
a61af66fc99e Initial load
duke
parents:
diff changeset
203 @echo Check for other out of date files in your workspace.
a61af66fc99e Initial load
duke
parents:
diff changeset
204 @echo "========================================================="
a61af66fc99e Initial load
duke
parents:
diff changeset
205 @exit 666
a61af66fc99e Initial load
duke
parents:
diff changeset
206
a61af66fc99e Initial load
duke
parents:
diff changeset
207 .PHONY: default