author | xuelei |
Thu, 17 May 2018 11:12:52 -0700 | |
branch | JDK-8145252-TLS13-branch |
changeset 56570 | 60ff67126765 |
parent 48919 | c7e84c0a51c3 |
child 51899 | 11fd6c8188d9 |
permissions | -rw-r--r-- |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
1 |
#!/bin/bash |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
2 |
# |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
3 |
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
5 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
6 |
# This code is free software; you can redistribute it and/or modify it |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
8 |
# published by the Free Software Foundation. Oracle designates this |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
9 |
# particular file as subject to the "Classpath" exception as provided |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
10 |
# by Oracle in the LICENSE file that accompanied this code. |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
11 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
12 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
13 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
14 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
15 |
# version 2 for more details (a copy is included in the LICENSE file that |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
16 |
# accompanied this code). |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
17 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
18 |
# You should have received a copy of the GNU General Public License version |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
19 |
# 2 along with this work; if not, write to the Free Software Foundation, |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
20 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
21 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
22 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
23 |
# or visit www.oracle.com if you need additional information or have any |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
24 |
# questions. |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
25 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
26 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
27 |
# This script creates a devkit for building OpenJDK on Solaris by copying |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
28 |
# part of a Solaris Studio installation and cretaing a sysroot by installing |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
29 |
# a limited set of system packages. It is assumed that a suitable pkg |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
30 |
# publisher is configured for the system where the script is executed. |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
31 |
# |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
32 |
# Note that you will need to be able to sudo to root to run the pkg install |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
33 |
# part of this script. It should not affect the running system, but only |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
34 |
# install in a separate temporary image. |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
35 |
# |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
36 |
# The Solaris Studio installation must contain at least these packages: |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
37 |
# developer/developerstudio-126/backend 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
38 |
# developer/developerstudio-126/c++ 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
39 |
# developer/developerstudio-126/cc 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
40 |
# developer/developerstudio-126/dbx (solarisstudio) 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
41 |
# developer/developerstudio-126/library/c++-libs 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
42 |
# developer/developerstudio-126/library/math-libs 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
43 |
# developer/developerstudio-126/library/c-libs 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
44 |
# developer/developerstudio-126/library/studio-gccrt 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
45 |
# developer/developerstudio-126/studio-common 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
46 |
# developer/developerstudio-126/studio-ja 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
47 |
# developer/developerstudio-126/studio-legal 12.6-1.0.0.0 i-- |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
48 |
# developer/developerstudio-126/studio-zhCN 12.6-1.0.0.0 i-- |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
49 |
# |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
50 |
# erik.joelsson@oracle.com |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
51 |
|
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
52 |
USAGE="$0 <Solaris Studio installation>" |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
53 |
|
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
54 |
if [ "$1" = "" ]; then |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
55 |
echo $USAGE |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
56 |
exit 1 |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
57 |
fi |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
58 |
|
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
59 |
SOLARIS_STUDIO_VERSION=12u6 |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
60 |
SOLARIS_VERSION=11u3 |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
61 |
SOLARIS_ENTIRE_VERSION=0.5.11-0.175.3.20.0.6.0 |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
62 |
case `uname -p` in |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
63 |
i*) |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
64 |
ARCH=x86 |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
65 |
;; |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
66 |
sparc*) |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
67 |
ARCH=sparc |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
68 |
;; |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
69 |
esac |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
70 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
71 |
SOLARIS_STUDIO_SRC=$1 |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
72 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
73 |
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
74 |
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
75 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
76 |
DEVKIT_NAME=SS${SOLARIS_STUDIO_VERSION}-Solaris${SOLARIS_VERSION} |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
77 |
DEVKIT_ROOT=${BUILD_DIR}/${DEVKIT_NAME} |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
78 |
BUNDLE_NAME=${DEVKIT_NAME}.tar.gz |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
79 |
BUNDLE=${BUILD_DIR}/${BUNDLE_NAME} |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
80 |
INSTALL_ROOT=${BUILD_DIR}/install-root-$SOLARIS_VERSION |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
81 |
SYSROOT=${DEVKIT_ROOT}/sysroot |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
82 |
SOLARIS_STUDIO_SUBDIR=SS${SOLARIS_STUDIO_VERSION} |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
83 |
SOLARIS_STUDIO_DIR=${DEVKIT_ROOT}/${SOLARIS_STUDIO_SUBDIR} |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
84 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
85 |
# Extract the publisher from the system |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
86 |
if [ -z "${PUBLISHER_URI}" ]; then |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
87 |
PUBLISHER_URI="$(pkg publisher solaris | grep URI | awk '{ print $3 }')" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
88 |
fi |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
89 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
90 |
if [ ! -d $INSTALL_ROOT ]; then |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
91 |
echo "Creating $INSTALL_ROOT and installing packages" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
92 |
pkg image-create $INSTALL_ROOT |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
93 |
pkg -R $INSTALL_ROOT set-publisher -P -g ${PUBLISHER_URI} solaris |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
94 |
sudo pkg -R $INSTALL_ROOT install --accept entire@$SOLARIS_ENTIRE_VERSION \ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
95 |
system/install developer/gnu-binutils system/library/mmheap system/picl \ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
96 |
developer/assembler |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
97 |
else |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
98 |
echo "Skipping installing packages" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
99 |
fi |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
100 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
101 |
if [ ! -d $SYSROOT ]; then |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
102 |
echo "Copying from $INSTALL_ROOT to $SYSROOT" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
103 |
mkdir -p $SYSROOT |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
104 |
cp -rH $INSTALL_ROOT/lib $SYSROOT/ |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
105 |
mkdir $SYSROOT/usr |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
106 |
cp -rH $INSTALL_ROOT/usr/lib $SYSROOT/usr/ |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
107 |
cp -rH $INSTALL_ROOT/usr/include $SYSROOT/usr/ |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
108 |
pkg -R $INSTALL_ROOT list > $SYSROOT/pkg-list.txt |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
109 |
else |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
110 |
echo "Skipping copying to $SYSROOT" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
111 |
fi |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
112 |
|
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
113 |
if [ ! -d $DEVKIT_ROOT/tools ]; then |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
114 |
# Some of the tools in sysroot are needed in the OpenJDK build. We need |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
115 |
# to copy them into a tools dir, including their specific libraries. |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
116 |
mkdir -p $DEVKIT_ROOT/tools/usr/bin $DEVKIT_ROOT/tools/lib/sparcv9 \ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
117 |
$DEVKIT_ROOT/tools/usr/gnu/bin $DEVKIT_ROOT/tools/usr/bin/sparcv9 |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
118 |
cp $INSTALL_ROOT/usr/bin/{as,ar,nm,strip,ld,pigz,ldd} \ |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
119 |
$DEVKIT_ROOT/tools/usr/bin/ |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
120 |
cp $INSTALL_ROOT/usr/sbin/dtrace $DEVKIT_ROOT/tools/usr/bin/ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
121 |
cp $INSTALL_ROOT/usr/sbin/sparcv9/dtrace $DEVKIT_ROOT/tools/usr/bin/sparcv9/ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
122 |
cp -rH $INSTALL_ROOT/usr/gnu/bin/* $DEVKIT_ROOT/tools/usr/gnu/bin/ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
123 |
cp $INSTALL_ROOT/lib/sparcv9/{libelf.so*,libld.so*,liblddbg.so*} $DEVKIT_ROOT/tools/lib/sparcv9/ |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
124 |
for t in $(ls $DEVKIT_ROOT/tools/usr/gnu/bin); do |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
125 |
if [ -f $DEVKIT_ROOT/tools/usr/gnu/bin/$t ]; then |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
126 |
ln -s ../gnu/bin/$t $DEVKIT_ROOT/tools/usr/bin/g$t |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
127 |
fi |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
128 |
done |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
129 |
else |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
130 |
echo "Skipping copying to tools dir $DEVKIT_ROOT/tools" |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
131 |
fi |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
132 |
|
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
133 |
if [ ! -d $SOLARIS_STUDIO_DIR ]; then |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
134 |
echo "Copying Solaris Studio from $SOLARIS_STUDIO_SRC" |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
135 |
mkdir -p ${SOLARIS_STUDIO_DIR} |
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
136 |
cp -rH $SOLARIS_STUDIO_SRC/. ${SOLARIS_STUDIO_DIR}/ |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
137 |
# Solaris Studio 12.6 requires libmmheap.so.1 and libsunmath.so.1 to run, but |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
138 |
# these libs are not installed by default on all Solaris systems. |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
139 |
# Sneak them in from the sysroot to make it run OOTB on more systems. |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
140 |
cp $SYSROOT/lib/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/ |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
141 |
cp $SYSROOT/lib/sparcv9/libsunmath.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/ |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
142 |
cp $SYSROOT/lib/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/ |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
143 |
cp $SYSROOT/lib/sparcv9/libmmheap.so.1 $SOLARIS_STUDIO_DIR/lib/compilers/sys/sparcv9/ |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
144 |
else |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
145 |
echo "Skipping copying of Solaris Studio" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
146 |
fi |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
147 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
148 |
# Create the devkit.info file |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
149 |
echo Creating devkit.info |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
150 |
INFO_FILE=$DEVKIT_ROOT/devkit.info |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
151 |
rm -f $INFO_FILE |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
152 |
echo "# This file describes to configure how to interpret the contents of this devkit" >> $INFO_FILE |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
153 |
echo "DEVKIT_NAME=\"Solaris Studio $SOLARIS_STUDIO_VERSION - Solaris $SOLARIS_VERSION - $ARCH\"" >> $INFO_FILE |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
154 |
echo "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/$SOLARIS_STUDIO_SUBDIR/bin:\$DEVKIT_ROOT/bin\"" >> $INFO_FILE |
48909
54b423e1c4cf
8153294: Solaris devkit uses linker from system instead of in devkit
erikj
parents:
34606
diff
changeset
|
155 |
echo "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/tools/usr/bin\"" >> $INFO_FILE |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
156 |
echo "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/sysroot\"" >> $INFO_FILE |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
157 |
|
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
158 |
if [ ! -e $BUNDLE ]; then |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
159 |
GZIP=$(command -v pigz) |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
160 |
if [ -z "$GZIP" ]; then |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
161 |
GZIP="gzip" |
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
162 |
fi |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
163 |
echo "Creating $BUNDLE from $DEVKIT_ROOT" |
48919
c7e84c0a51c3
8198328: Create devkit for Solaris with developer studio 12.6 and Solaris11.3
erikj
parents:
48909
diff
changeset
|
164 |
(cd $DEVKIT_ROOT && tar cf - . | $GZIP - > "$BUNDLE") |
34595
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
165 |
else |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
166 |
echo "Skipping creation of $BUNDLE" |
09596fe63e2d
8145391: Updated jprt.properties, devtools, jib and readme with SS12u4
erikj
parents:
diff
changeset
|
167 |
fi |