Mercurial > hg > graal-jvmci-8
comparison make/linux/makefiles/vm.make @ 1930:2d26b0046e0d
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Tue, 30 Nov 2010 14:53:30 +0100 |
parents | 1f81c0d18c75 d2ede61b7a12 |
children | 06f017f7daa7 |
comparison
equal
deleted
inserted
replaced
1484:6b7001391c97 | 1930:2d26b0046e0d |
---|---|
1 # | 1 # |
2 # Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. | 2 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 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 | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
14 # | 14 # |
15 # You should have received a copy of the GNU General Public License version | 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, | 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. | 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
18 # | 18 # |
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 # CA 95054 USA or visit www.sun.com if you need additional information or | 20 # or visit www.oracle.com if you need additional information or have any |
21 # have any questions. | 21 # questions. |
22 # | 22 # |
23 # | 23 # |
24 | 24 |
25 # Rules to build JVM and related libraries, included from vm.make in the build | 25 # Rules to build JVM and related libraries, included from vm.make in the build |
26 # directory. | 26 # directory. |
96 # Do not use C++ exception handling | 96 # Do not use C++ exception handling |
97 CFLAGS += $(CFLAGS/NOEX) | 97 CFLAGS += $(CFLAGS/NOEX) |
98 | 98 |
99 # Extra flags from gnumake's invocation or environment | 99 # Extra flags from gnumake's invocation or environment |
100 CFLAGS += $(EXTRA_CFLAGS) | 100 CFLAGS += $(EXTRA_CFLAGS) |
101 LFLAGS += $(EXTRA_CFLAGS) | |
101 | 102 |
102 LIBS += -lm -ldl -lpthread | 103 LIBS += -lm -ldl -lpthread |
103 | 104 |
104 # By default, link the *.o into the library, not the executable. | 105 # By default, link the *.o into the library, not the executable. |
105 LINK_INTO$(LINK_INTO) = LIBJVM | 106 LINK_INTO$(LINK_INTO) = LIBJVM |
134 cat $^ > $@ | 135 cat $^ > $@ |
135 | 136 |
136 vm.def: $(Res_Files) $(Obj_Files) | 137 vm.def: $(Res_Files) $(Obj_Files) |
137 sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ | 138 sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ |
138 | 139 |
139 ifeq ($(ZERO_LIBARCH), ppc64) | 140 ifeq ($(SHARK_BUILD), true) |
140 STATIC_CXX = false | 141 STATIC_CXX = false |
141 else | 142 else |
142 STATIC_CXX = true | 143 ifeq ($(ZERO_LIBARCH), ppc64) |
144 STATIC_CXX = false | |
145 else | |
146 STATIC_CXX = true | |
147 endif | |
143 endif | 148 endif |
144 | 149 |
145 ifeq ($(LINK_INTO),AOUT) | 150 ifeq ($(LINK_INTO),AOUT) |
146 LIBJVM.o = | 151 LIBJVM.o = |
147 LIBJVM_MAPFILE = | 152 LIBJVM_MAPFILE = |
164 | 169 |
165 LIBS_VM += $(LIBS) | 170 LIBS_VM += $(LIBS) |
166 endif | 171 endif |
167 ifeq ($(ZERO_BUILD), true) | 172 ifeq ($(ZERO_BUILD), true) |
168 LIBS_VM += $(LIBFFI_LIBS) | 173 LIBS_VM += $(LIBFFI_LIBS) |
174 endif | |
175 ifeq ($(SHARK_BUILD), true) | |
176 LFLAGS_VM += $(LLVM_LDFLAGS) | |
177 LIBS_VM += $(LLVM_LIBS) | |
169 endif | 178 endif |
170 | 179 |
171 LINK_VM = $(LINK_LIB.c) | 180 LINK_VM = $(LINK_LIB.c) |
172 | 181 |
173 # rule for building precompiled header | 182 # rule for building precompiled header |
207 $(LINK_LIB.CC/PRE_HOOK) \ | 216 $(LINK_LIB.CC/PRE_HOOK) \ |
208 $(LINK_VM) $(LD_SCRIPT_FLAG) \ | 217 $(LINK_VM) $(LD_SCRIPT_FLAG) \ |
209 $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \ | 218 $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \ |
210 $(LINK_LIB.CC/POST_HOOK) \ | 219 $(LINK_LIB.CC/POST_HOOK) \ |
211 rm -f $@.1; ln -s $@ $@.1; \ | 220 rm -f $@.1; ln -s $@ $@.1; \ |
212 if [ -x /usr/sbin/selinuxenabled ] ; then \ | 221 [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \ |
213 /usr/sbin/selinuxenabled; \ | 222 if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \ |
214 if [ $$? = 0 ] ; then \ | 223 if [ -x /usr/sbin/selinuxenabled ] ; then \ |
215 /usr/bin/chcon -t textrel_shlib_t $@; \ | 224 /usr/sbin/selinuxenabled; \ |
216 if [ $$? != 0 ]; then \ | 225 if [ $$? = 0 ] ; then \ |
217 echo "ERROR: Cannot chcon $@"; \ | 226 /usr/bin/chcon -t textrel_shlib_t $@; \ |
218 fi \ | 227 if [ $$? != 0 ]; then \ |
219 fi \ | 228 echo "ERROR: Cannot chcon $@"; \ |
220 fi \ | 229 fi \ |
230 fi \ | |
231 fi \ | |
232 fi \ | |
221 } | 233 } |
222 #[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \ | |
223 | 234 |
224 DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) | 235 DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) |
225 | 236 |
226 install_jvm: $(LIBJVM) | 237 install_jvm: $(LIBJVM) |
227 @echo "Copying $(LIBJVM) to $(DEST_JVM)" | 238 @echo "Copying $(LIBJVM) to $(DEST_JVM)" |