annotate make/linux/build.sh @ 7432:0b3d19153cc6

8001028: Improve GC option handling Summary: If there are not enough native resources to create the ReferenceHandler or Finalizer Java threads, the VM will attempt to throw an OOME before the java.lang.Class class has been initialized. This can result in assertion failures and other crashes. Move the initialization of the java.lang.Class class to just before the initialization of the java.lang.ref.Finalizer class. Reviewed-by: jwilhelm, dholmes, coleenp
author johnc
date Wed, 12 Dec 2012 12:07:32 -0800
parents 075ea0ed9e7c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 #! /bin/sh
a61af66fc99e Initial load
duke
parents:
diff changeset
2 #
3958
075ea0ed9e7c 7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded
kvn
parents: 1552
diff changeset
3 # Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
5 #
a61af66fc99e Initial load
duke
parents:
diff changeset
6 # This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
7 # under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
8 # published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
9 #
a61af66fc99e Initial load
duke
parents:
diff changeset
10 # This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
13 # version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
14 # accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
15 #
a61af66fc99e Initial load
duke
parents:
diff changeset
16 # You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
17 # 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
19 #
1552
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
21 # or visit www.oracle.com if you need additional information or have any
c18cbe5936b8 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 196
diff changeset
22 # questions.
0
a61af66fc99e Initial load
duke
parents:
diff changeset
23 #
a61af66fc99e Initial load
duke
parents:
diff changeset
24 #
a61af66fc99e Initial load
duke
parents:
diff changeset
25
a61af66fc99e Initial load
duke
parents:
diff changeset
26 # Make sure the variable JAVA_HOME is set before running this script.
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28 set -u
a61af66fc99e Initial load
duke
parents:
diff changeset
29
a61af66fc99e Initial load
duke
parents:
diff changeset
30
a61af66fc99e Initial load
duke
parents:
diff changeset
31 if [ $# != 2 ]; then
a61af66fc99e Initial load
duke
parents:
diff changeset
32 echo "Usage : $0 Build_Options Location"
a61af66fc99e Initial load
duke
parents:
diff changeset
33 echo "Build Options : debug or optimized or basicdebug or basic or clean"
a61af66fc99e Initial load
duke
parents:
diff changeset
34 echo "Location : specify any workspace which has gamma sources"
a61af66fc99e Initial load
duke
parents:
diff changeset
35 exit 1
a61af66fc99e Initial load
duke
parents:
diff changeset
36 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
37
a61af66fc99e Initial load
duke
parents:
diff changeset
38 # Just in case:
a61af66fc99e Initial load
duke
parents:
diff changeset
39 case ${JAVA_HOME} in
a61af66fc99e Initial load
duke
parents:
diff changeset
40 /*) true;;
a61af66fc99e Initial load
duke
parents:
diff changeset
41 ?*) JAVA_HOME=`( cd $JAVA_HOME; pwd )`;;
a61af66fc99e Initial load
duke
parents:
diff changeset
42 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
43
a61af66fc99e Initial load
duke
parents:
diff changeset
44 case `uname -m` in
a61af66fc99e Initial load
duke
parents:
diff changeset
45 i386|i486|i586|i686)
a61af66fc99e Initial load
duke
parents:
diff changeset
46 mach=i386
a61af66fc99e Initial load
duke
parents:
diff changeset
47 ;;
3958
075ea0ed9e7c 7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded
kvn
parents: 1552
diff changeset
48 x86_64)
075ea0ed9e7c 7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded
kvn
parents: 1552
diff changeset
49 mach=amd64
075ea0ed9e7c 7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded
kvn
parents: 1552
diff changeset
50 ;;
0
a61af66fc99e Initial load
duke
parents:
diff changeset
51 *)
a61af66fc99e Initial load
duke
parents:
diff changeset
52 echo "Unsupported machine: " `uname -m`
a61af66fc99e Initial load
duke
parents:
diff changeset
53 exit 1
a61af66fc99e Initial load
duke
parents:
diff changeset
54 ;;
a61af66fc99e Initial load
duke
parents:
diff changeset
55 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
56
a61af66fc99e Initial load
duke
parents:
diff changeset
57 if [ "${JAVA_HOME}" = "" -o ! -d "${JAVA_HOME}" -o ! -d ${JAVA_HOME}/jre/lib/${mach} ]; then
a61af66fc99e Initial load
duke
parents:
diff changeset
58 echo "JAVA_HOME needs to be set to a valid JDK path"
a61af66fc99e Initial load
duke
parents:
diff changeset
59 echo "ksh : export JAVA_HOME=/net/tetrasparc/export/gobi/JDK1.2_fcs_V/linux"
a61af66fc99e Initial load
duke
parents:
diff changeset
60 echo "csh : setenv JAVA_HOME /net/tetrasparc/export/gobi/JDK1.2_fcs_V/linux"
a61af66fc99e Initial load
duke
parents:
diff changeset
61 exit 1
a61af66fc99e Initial load
duke
parents:
diff changeset
62 fi
a61af66fc99e Initial load
duke
parents:
diff changeset
63
a61af66fc99e Initial load
duke
parents:
diff changeset
64
a61af66fc99e Initial load
duke
parents:
diff changeset
65 LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/`uname -p`:\
a61af66fc99e Initial load
duke
parents:
diff changeset
66 ${JAVA_HOME}/jre/lib/`uname -p`/native_threads:${LD_LIBRARY_PATH-.}
a61af66fc99e Initial load
duke
parents:
diff changeset
67
a61af66fc99e Initial load
duke
parents:
diff changeset
68 # This is necessary as long as we are using the old launcher
a61af66fc99e Initial load
duke
parents:
diff changeset
69 # with the new distribution format:
a61af66fc99e Initial load
duke
parents:
diff changeset
70 CLASSPATH=${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH-.}
a61af66fc99e Initial load
duke
parents:
diff changeset
71
a61af66fc99e Initial load
duke
parents:
diff changeset
72
a61af66fc99e Initial load
duke
parents:
diff changeset
73 for gm in gmake gnumake
a61af66fc99e Initial load
duke
parents:
diff changeset
74 do
a61af66fc99e Initial load
duke
parents:
diff changeset
75 if [ "${GNUMAKE-}" != "" ]; then break; fi
a61af66fc99e Initial load
duke
parents:
diff changeset
76 ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm
a61af66fc99e Initial load
duke
parents:
diff changeset
77 done
a61af66fc99e Initial load
duke
parents:
diff changeset
78 : ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'}
a61af66fc99e Initial load
duke
parents:
diff changeset
79
a61af66fc99e Initial load
duke
parents:
diff changeset
80
a61af66fc99e Initial load
duke
parents:
diff changeset
81 echo "### ENVIRONMENT SETTINGS:"
a61af66fc99e Initial load
duke
parents:
diff changeset
82 export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME"
a61af66fc99e Initial load
duke
parents:
diff changeset
83 export LD_LIBRARY_PATH ; echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
a61af66fc99e Initial load
duke
parents:
diff changeset
84 export CLASSPATH ; echo "CLASSPATH=$CLASSPATH"
a61af66fc99e Initial load
duke
parents:
diff changeset
85 export GNUMAKE ; echo "GNUMAKE=$GNUMAKE"
a61af66fc99e Initial load
duke
parents:
diff changeset
86 echo "###"
a61af66fc99e Initial load
duke
parents:
diff changeset
87
a61af66fc99e Initial load
duke
parents:
diff changeset
88 Build_Options=$1
a61af66fc99e Initial load
duke
parents:
diff changeset
89 Location=$2
a61af66fc99e Initial load
duke
parents:
diff changeset
90
a61af66fc99e Initial load
duke
parents:
diff changeset
91 case ${Location} in
a61af66fc99e Initial load
duke
parents:
diff changeset
92 /*) true;;
a61af66fc99e Initial load
duke
parents:
diff changeset
93 ?*) Location=`(cd ${Location}; pwd)`;;
a61af66fc99e Initial load
duke
parents:
diff changeset
94 esac
a61af66fc99e Initial load
duke
parents:
diff changeset
95
a61af66fc99e Initial load
duke
parents:
diff changeset
96 echo \
91
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
97 ${GNUMAKE} -f ${Location}/make/linux/Makefile $Build_Options GAMMADIR=${Location}
a294fd0c4b38 6583644: Move all managed/SCCS files out of 'build' into 'make' directory
kamg
parents: 0
diff changeset
98 ${GNUMAKE} -f ${Location}/make/linux/Makefile $Build_Options GAMMADIR=${Location}